Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(receive): --base-url option and GHE_HOST #1719

Merged
merged 3 commits into from
Aug 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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