mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Github Document Loader Node): Pass through apiUrl from credentials & fix log output (#11049)
This commit is contained in:
@@ -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),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user