Skip to content

Commit fef67be

Browse files
committed
Include API url setting
1 parent 389b6b0 commit fef67be

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ GitLab's API [does not allow downloading of attachments](https://gitlab.com/gitl
6464

6565
#### github.baseUrl
6666

67-
Where is the github instance hosted? Default is the official `api.github.com` domain
67+
Where is the github instance hosted? The default is the official `github.com` domain
68+
69+
#### github.apiUrl
70+
71+
Point this to the api. The default is `api.github.com`.
6872

6973
#### github.owner
7074

sample_settings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export default {
88
sessionCookie: null,
99
},
1010
github: {
11-
// baseUrl: 'https://gitlab.mycompany.com:123/etc',
11+
// baseUrl: 'https://github.mycompany.com:123/etc',
12+
// apiUrl: 'https//api.github.mycompany.com',
1213
owner: '{{repository owner (user or organization)}}',
1314
token: '{{token}}',
1415
token_owner: '{{token_owner}}',

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ const MyOctokit = GitHubApi.plugin(throttling);
4848
const githubApi = new MyOctokit({
4949
previews: settings.useIssueImportAPI ? ['golden-comet'] : [],
5050
debug: false,
51-
baseUrl: settings.github.baseUrl
52-
? settings.github.baseUrl
51+
baseUrl: settings.github.apiUrl
52+
? settings.github.apiUrl
5353
: 'https://api.github.com',
5454
timeout: 5000,
5555
headers: {

src/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default interface Settings {
3535

3636
export interface GithubSettings {
3737
baseUrl?: string;
38+
apiUrl?: string;
3839
owner: string;
3940
token: string;
4041
token_owner: string;

0 commit comments

Comments
 (0)