Skip to content

github: Fix native stacks on GHE.com - #1499

Merged
abhinav merged 1 commit into
mainfrom
fix-ghe-cloud-stacks
Oct 28, 2026
Merged

abhinav merged 1 commit into
mainfrom
fix-ghe-cloud-stacks

Conversation

@abhinav

@abhinav abhinav commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Native stack updates and atomic merges are skipped when
spice.forge.github.apiUrl points to https://api.<tenant>.ghe.com.
The gateway appends /v3 to REST requests for every host except
api.github.com, but GHE.com serves REST at the API host root.
The stack probe interprets the resulting 404 as an unsupported feature,
so callers silently fall back to ordinary PR operations.
GraphQL requests already use the correct /graphql endpoint.

Recognize GHE.com API hosts alongside api.github.com when selecting
the REST base, preserving /api/v3 for Enterprise Server.

Centralize web URL defaults and API endpoint derivation in Deployment:

github.Deployment{URL: o.URL, APIURL: o.APIURL}

The forge forwards its raw URL settings, and the gateway resolves the
protocol endpoints, so deployment URL rules have one owner.
Keep web URL selection independent of API parsing,
which still occurs when opening a repository.

Fixes #1498

Native stack updates and atomic merges are skipped when
`spice.forge.github.apiUrl` points to `https://api.<tenant>.ghe.com`.
The gateway appends `/v3` to REST requests for every host except
`api.github.com`, but GHE.com serves REST at the API host root.
The stack probe interprets the resulting 404 as an unsupported feature,
so callers silently fall back to ordinary PR operations.
GraphQL requests already use the correct `/graphql` endpoint.

Recognize GHE.com API hosts alongside `api.github.com` when selecting
the REST base, preserving `/api/v3` for Enterprise Server.

Centralize web URL defaults and API endpoint derivation in `Deployment`:

    github.Deployment{URL: o.URL, APIURL: o.APIURL}

The forge forwards its raw URL settings, and the gateway resolves the
protocol endpoints, so deployment URL rules have one owner.
Keep web URL selection independent of API parsing,
which still occurs when opening a repository.

Fixes #1498
@abhinav

abhinav commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@abhinav
abhinav enabled auto-merge (squash) October 28, 2026 05:04
@abhinav
abhinav merged commit 3a39f62 into main Oct 28, 2026
22 checks passed
@abhinav
abhinav deleted the fix-ghe-cloud-stacks branch October 28, 2026 05:14
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.

GitHub native stacks silently disabled on GHE.com (data residency) hosts

1 participant