-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
Add support for GitHub Enterprise Server (GHES) by allowing users to configure a custom GitHub API base URL.
Background
The GithubAPIURL option was removed during the ghinstallation refactor (PR #32). While the previous implementation wasn't properly wired up, the option should be restored and correctly integrated for users running GHES.
What needs to change
API server (pkg/api/)
- Add
GithubAPIURLback toOptionsinserver.go - Add
GithubAPIURLCLI flag/env var back toAPICmdincmd/shepherd/api.go - In
NewGitHubClient(), setAppsTransport.BaseURLwhen a custom URL is provided - ghinstallation supports this via
ghinstallation.NewAppsTransportWithOptions()or settingatr.BaseURLafter creation
GitHub adapter (pkg/adapters/github/)
- Add
GithubAPIURLto adapterOptions - Pass it through to the GitHub client constructor
- The adapter's
Clientalready usesgo-github'sWithEnterpriseURLs()for the comment-posting client
CLI (cmd/shepherd/main.go)
- Add
GithubAPIURLflag withdefault:"https://api.github.com"andenv:"SHEPHERD_GITHUB_API_URL"to bothAPICmdandGitHubCmd
Acceptance criteria
- Both API server and GitHub adapter accept a
--github-api-url/SHEPHERD_GITHUB_API_URLflag - When set, ghinstallation targets the custom URL for token generation
- When set, the adapter's GitHub client targets the custom URL for comments
- Default behavior (public GitHub) remains unchanged when the option is empty or set to
https://api.github.com - Tests cover custom URL wiring
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels