Skip to content

fix(vcs): derive the GitHub web host from the configured API base - #725

Merged
Makisuo merged 1 commit into
fix/04-self-hosted-ingestion-uifrom
fix/05-github-enterprise-host
Sep 1, 2026
Merged

fix(vcs): derive the GitHub web host from the configured API base#725
Makisuo merged 1 commit into
fix/04-self-hosted-ingestion-uifrom
fix/05-github-enterprise-host

Conversation

@Makisuo

@Makisuo Makisuo commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Last of a five-PR stack, based on #724.

GITHUB_API_BASE_URL points an installation at GitHub Enterprise, but the two URLs that are not on the API host were hardcoded to https://github.com:

  • the App installation redirect, in GithubConnectService.startConnect
  • the OAuth code exchange, which posts the App's client_id and client_secret

An Enterprise deployment therefore sent those credentials to public GitHub and opened an install page for an app that does not exist there.

Both derive the web host from the same setting now, stripping the Enterprise Server /api/v3 suffix and mapping api.github.com to github.com. An unparseable value falls back to public GitHub, which is the existing default.

Tests

github-hosts.test.ts covers public GitHub, the Enterprise suffix, a path-prefixed Enterprise install, and the unparseable fallback.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

`GITHUB_API_BASE_URL` points an installation at GitHub Enterprise, but the two
URLs that are not on the API host were hardcoded to `https://github.com`: the
App installation redirect, and the OAuth code exchange — which posts the App's
client id and secret. An Enterprise deployment therefore sent those credentials
to public GitHub and opened an install page for an app that does not exist
there.

Both now derive the web host from the same setting, stripping the Enterprise
Server `/api/v3` suffix and mapping `api.github.com` to `github.com`. An
unparseable value falls back to public GitHub, which is the existing default.
@Makisuo
Makisuo force-pushed the fix/05-github-enterprise-host branch from 3a0eb56 to 27016e9 Compare September 1, 2026 14:51
@Makisuo
Makisuo merged commit 9d39c1c into main Sep 1, 2026
27 checks passed
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🍁 Maple PR preview

Warning

Preview cleanup could not be confirmed. The Alchemy teardown outcome was skipped.

Final commit 27016e9 · View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant