Skip to content

Commit

Permalink
fix(receive): --base-url option and GHE_HOST (#1719)
Browse files Browse the repository at this point in the history
  • Loading branch information
wgillaspy committed Aug 29, 2022
1 parent be45120 commit 68c9b91
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bin/probot-receive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ async function main() {
'Set to your Sentry DSN, e.g. "https://1234abcd@sentry.io/12345"',
process.env.SENTRY_DSN
)
.option(
"--base-url <url>",
'GitHub API base URL. If you use GitHub Enterprise Server, and your hostname is "https://github.acme-inc.com", then the root URL is "https://github.acme-inc.com/api/v3"',
process.env.GHE_HOST
? `${process.env.GHE_PROTOCOL || "https"}://${
process.env.GHE_HOST
}/api/v3`
: "https://api.github.com"
)
.parse(process.argv);

const githubToken = program.token;
Expand Down Expand Up @@ -89,6 +98,7 @@ async function main() {
privateKey: String(privateKey),
githubToken: githubToken,
log,
baseUrl: program.baseUrl,
});

const appFn = await resolveAppFunction(
Expand Down

0 comments on commit 68c9b91

Please sign in to comment.