Skip to content

Add GitHub Enterprise support#60

Open
danielpops wants to merge 1 commit intoanthropics:mainfrom
danielpops:dpopes/github-enterprise-support
Open

Add GitHub Enterprise support#60
danielpops wants to merge 1 commit intoanthropics:mainfrom
danielpops:dpopes/github-enterprise-support

Conversation

@danielpops
Copy link

Support GitHub Enterprise Server by using the GITHUB_API_URL environment variable (automatically set by GitHub Actions for Enterprise instances).

Changes:

  • GitHubActionClient: Use api_base_url from GITHUB_API_URL env var for all GitHub API requests, with fallback to api.github.com
  • comment-pr-findings.js: Set GH_HOST and GH_TOKEN for gh CLI when GITHUB_API_URL indicates an Enterprise instance
  • eval_engine.py: Use dynamic github_host for git clone/fetch URLs, use x-access-token format for PAT auth, set GIT_TERMINAL_PROMPT=0 to prevent credential prompts, pass GITHUB_API_URL to subprocess
  • Add tests for GitHub Enterprise URL handling

Environment variables:

Support GitHub Enterprise Server by using the GITHUB_API_URL environment
variable (automatically set by GitHub Actions for Enterprise instances).

Changes:
- GitHubActionClient: Use api_base_url from GITHUB_API_URL env var for all
  GitHub API requests, with fallback to api.github.com
- comment-pr-findings.js: Set GH_HOST and GH_TOKEN for gh CLI when
  GITHUB_API_URL indicates an Enterprise instance
- eval_engine.py: Use dynamic github_host for git clone/fetch URLs, use
  x-access-token format for PAT auth, set GIT_TERMINAL_PROMPT=0 to prevent
  credential prompts, pass GITHUB_API_URL to subprocess
- Add tests for GitHub Enterprise URL handling

Environment variables:
- GITHUB_API_URL: GitHub API base URL (e.g., https://github.example.com/api/v3)
- GITHUB_TOKEN: Personal access token for authentication
@danielpops danielpops force-pushed the dpopes/github-enterprise-support branch from 5e063fd to 2ff1ab3 Compare February 13, 2026 01:07
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