-
Notifications
You must be signed in to change notification settings - Fork 1
GitHub Enterprise support via configurable API base URL #2
Copy link
Copy link
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
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
GitHub Enterprise support via configurable API base URL
Context
I tried pointing
prwat a GitHub Enterprise host and realized the client is hardwired tohttps://api.github.com, so nothing worked.Problem
NewClientignores 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
Acceptance criteria
api_base_urloption with defaulthttps://api.github.com.github.NewClient.NewClientvalidates and uses the provided base URL for requests.PRW_API_BASE_URLenv var overriding configHints
Touch
internal/config/config.go,cmd/prw/main.go, andinternal/github/client.go.