I propose that all compatibility functionality not required for the github.com target be removed from the default client setup and only be included via a github.With<THING> option. This (hopefully) would make the default client surface area simpler to understand. The justification for this is that you already need to use github.WithEnterpriseURLs to target non github.com. I propose the following changes to adopt this pattern, with the potential for other capabilities (such as enabling/disabling preview endpoints) to be added later.
- Default to the latest API version (
2026-03-10)
- Functions that require a specific version now check against the client version and error if not valid
- Add
github.WithAPIVersion to explicitly set a version
- Set at the client/service level
- Add
github.WithAdvancedServer to enable GHAS support
- Better validation of inputs
- Support setting version
- Add compatibility accordingly
- Add
github.WithEnterpriseCloud to enable GHEC support
- Better validation of inputs
- Deprecate
github.WithEnterpriseURLs
I'd appreciate any feedback on this proposal.
cc: @gmlewis - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode
I propose that all compatibility functionality not required for the github.com target be removed from the default client setup and only be included via a
github.With<THING>option. This (hopefully) would make the default client surface area simpler to understand. The justification for this is that you already need to usegithub.WithEnterpriseURLsto target non github.com. I propose the following changes to adopt this pattern, with the potential for other capabilities (such as enabling/disabling preview endpoints) to be added later.2026-03-10)github.WithAPIVersionto explicitly set a versiongithub.WithAdvancedServerto enable GHAS supportgithub.WithEnterpriseCloudto enable GHEC supportgithub.WithEnterpriseURLsI'd appreciate any feedback on this proposal.
cc: @gmlewis - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode