Skip to content

feat(github): add GitHub Enterprise Server support to GitHub Action#13860

Open
balcsida wants to merge 24 commits intoanomalyco:devfrom
balcsida:feat/ghes-support
Open

feat(github): add GitHub Enterprise Server support to GitHub Action#13860
balcsida wants to merge 24 commits intoanomalyco:devfrom
balcsida:feat/ghes-support

Conversation

@balcsida
Copy link

@balcsida balcsida commented Feb 16, 2026

What does this PR do?

Fixes #12830

The GitHub Action hardcodes github.com URLs everywhere, so it can't run on GHES. This PR reads GITHUB_SERVER_URL and GITHUB_API_URL env vars (set automatically by GHES runners) and uses them to derive all host-specific values — Octokit/GraphQL baseUrl, git credential config keys, noreply emails, fork remote URLs, image attachment regexes, and the token revocation endpoint. Defaults to github.com when the env vars aren't set, so nothing changes for existing users.

Also adds a parseGitRemote function (host-agnostic version of parseGitHubRemote) so the install command detects GHES remotes and generates a workflow with use_github_token: true and write permissions pre-configured.

How did you verify your code works?

  • Both files transpile cleanly with bun build --no-bundle
  • All 38 existing + new tests pass (bun test test/cli/github-remote.test.ts and github-action.test.ts)
  • New tests cover parseGitRemote with GHES URLs, SSH, HTTPS, various hosts
  • Verified no remaining hardcoded github.com references that should be parameterized (only defaults, comments, and the opencode app URL which correctly stays on github.com)

@neronlux
Copy link

Great request to allow use in Enterprise

@balcsida balcsida changed the title feat(github): add GitHub Enterprise Server support to GitHub Action feat: add GitHub Enterprise Server support to GitHub Action Feb 16, 2026
@balcsida balcsida changed the title feat: add GitHub Enterprise Server support to GitHub Action feat(github): add GitHub Enterprise Server support to GitHub Action Feb 16, 2026
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.

PR agent for Github enterprise server

2 participants

Comments