From a7af98183c47a5e215869c8269729b0fb2f318b5 Mon Sep 17 00:00:00 2001 From: oleg Date: Wed, 2 Oct 2024 11:29:01 +0200 Subject: [PATCH] fix(Github Document Loader Node): Pass through apiUrl from credentials & fix log output (#11049) --- .../DocumentGithubLoader/DocumentGithubLoader.node.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.ts b/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.ts index 7123ebbc38d69..916f0e7159cd6 100644 --- a/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.ts @@ -109,17 +109,22 @@ export class DocumentGithubLoader implements INodeType { 0, )) as CharacterTextSplitter | undefined; + const { index } = this.addInputData(NodeConnectionType.AiDocument, [ + [{ json: { repository, branch, ignorePaths, recursive } }], + ]); const docs = new GithubRepoLoader(repository, { branch, ignorePaths: (ignorePaths ?? '').split(',').map((p) => p.trim()), recursive, accessToken: (credentials.accessToken as string) || '', + apiUrl: credentials.server as string, }); const loadedDocs = textSplitter ? await textSplitter.splitDocuments(await docs.load()) : await docs.load(); + this.addOutputData(NodeConnectionType.AiDocument, index, [[{ json: { loadedDocs } }]]); return { response: logWrapper(loadedDocs, this), };