-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
configConfiguration loading, defaults, environment variables, and CLI wiringConfiguration loading, defaults, environment variables, and CLI wiringdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
GitHub Enterprise support via configurable API base URL
Context
I tried pointing prw at a GitHub Enterprise host and realized the client is hardwired to https://api.github.com, so nothing worked.
Problem
NewClient ignores any host override; config/CLI don’t expose an API base URL, so requests always go to GitHub.com.
Expected behavior
I can set an API base URL via config, with an optional PRW_API_BASE_URL env var override that defaults to https://api.github.com, and the client uses it for all requests after basic validation.
Scope / non-goals
- No fancy host auto-discovery.
- Keep defaults unchanged for GitHub.com users.
- Only add the minimal validation to avoid malformed URLs.
Acceptance criteria
- Config gains an
api_base_urloption with defaulthttps://api.github.com. - CLI wiring passes the configured base URL into
github.NewClient. -
NewClientvalidates and uses the provided base URL for requests. - README includes a short “GitHub Enterprise” setup note.
- Tests cover loading a custom host and verifying requests target it.
- Support
PRW_API_BASE_URLenv var overriding config
Hints
Touch internal/config/config.go, cmd/prw/main.go, and internal/github/client.go.
Metadata
Metadata
Assignees
Labels
configConfiguration loading, defaults, environment variables, and CLI wiringConfiguration loading, defaults, environment variables, and CLI wiringdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed