cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

Add support for `garage.github.com` #85

Closed mislav closed 1 year ago

mislav commented 1 year ago

Kind of odd that the check for garage comes before the call to normalizeHostname().

Normalizing the hostname turns garage.github.com into github.com, so it's a bit too late to check for garage afterwards. However, normalizing garage.github.com as github.com elsewhere is beneficial for token reuse: since it's technically not possible to complete the web browser flow gh auth login -h garage.github.com, the regular github.com token will be used for authenticating to garage environment.