feat(plugins/core): support GHES (#1188)
This commit is contained in:
@@ -54,7 +54,7 @@ export default async function({sandbox = false} = {}) {
|
||||
console.debug(util.inspect(conf.settings, {depth: Infinity, maxStringLength: 256}))
|
||||
|
||||
//Load octokits
|
||||
const api = {graphql: octokit.graphql.defaults({headers: {authorization: `token ${token}`}}), rest: new OctokitRest.Octokit({auth: token})}
|
||||
const api = {graphql: octokit.graphql.defaults({headers: {authorization: `token ${token}`}, baseUrl:conf.settings.api?.graphql ?? undefined}), rest: new OctokitRest.Octokit({auth: token, baseUrl: conf.settings.api?.rest ?? undefined})}
|
||||
//Apply mocking if needed
|
||||
if (mock)
|
||||
Object.assign(api, await mocks(api))
|
||||
|
||||
4
source/app/web/settings.example.json
generated
4
source/app/web/settings.example.json
generated
@@ -25,6 +25,10 @@
|
||||
"secret": null, "//": "GitHub OAUTH client secret",
|
||||
"url":"https://example.com", "//": "GitHub OAUTH callback url (must be the same as the web instance host)"
|
||||
},
|
||||
"api":{
|
||||
"rest": null, "//": "GitHub REST API custom endpoint",
|
||||
"graphql": null, "//": "GitHub GraphQL API custom endpoint"
|
||||
},
|
||||
"control":{
|
||||
"token": null, "//": "Control token (can be used by external services to perform actions on instance, such as stopping it for redeploys)"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user