@@ -61,6 +61,24 @@ class Github_DocumentLoaders implements INode {
61
61
optional : true ,
62
62
additionalParams : true
63
63
} ,
64
+ {
65
+ label : 'Github Base URL' ,
66
+ name : 'githubBaseUrl' ,
67
+ type : 'string' ,
68
+ placeholder : `https://git.example.com` ,
69
+ description : 'Custom Github Base Url (e.g. Enterprise)' ,
70
+ optional : true ,
71
+ additionalParams : true
72
+ } ,
73
+ {
74
+ label : 'Github Instance API' ,
75
+ name : 'githubInstanceApi' ,
76
+ type : 'string' ,
77
+ placeholder : `https://api.github.com` ,
78
+ description : 'Custom Github API Url (e.g. Enterprise)' ,
79
+ optional : true ,
80
+ additionalParams : true
81
+ } ,
64
82
{
65
83
label : 'Ignore Paths' ,
66
84
name : 'ignorePath' ,
@@ -134,6 +152,8 @@ class Github_DocumentLoaders implements INode {
134
152
const ignorePath = nodeData . inputs ?. ignorePath as string
135
153
const _omitMetadataKeys = nodeData . inputs ?. omitMetadataKeys as string
136
154
const output = nodeData . outputs ?. output as string
155
+ const githubInstanceApi = nodeData . inputs ?. githubInstanceApi as string
156
+ const githubBaseUrl = nodeData . inputs ?. githubBaseUrl as string
137
157
138
158
let omitMetadataKeys : string [ ] = [ ]
139
159
if ( _omitMetadataKeys ) {
@@ -153,6 +173,12 @@ class Github_DocumentLoaders implements INode {
153
173
if ( maxConcurrency ) githubOptions . maxConcurrency = parseInt ( maxConcurrency , 10 )
154
174
if ( maxRetries ) githubOptions . maxRetries = parseInt ( maxRetries , 10 )
155
175
if ( ignorePath ) githubOptions . ignorePaths = JSON . parse ( ignorePath )
176
+ if ( githubInstanceApi ) {
177
+ githubOptions . apiUrl = githubInstanceApi . endsWith ( '/' ) ? githubInstanceApi . slice ( 0 , - 1 ) : githubInstanceApi
178
+ }
179
+ if ( githubBaseUrl ) {
180
+ githubOptions . baseUrl = githubBaseUrl . endsWith ( '/' ) ? githubBaseUrl . slice ( 0 , - 1 ) : githubBaseUrl
181
+ }
156
182
157
183
const loader = new GithubRepoLoader ( repoLink , githubOptions )
158
184
0 commit comments