Support github.localhost as a non-enterprise host#4523
Conversation
|
Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message. |
mislav
left a comment
There was a problem hiding this comment.
Thanks; this looks great!
Rather than specifying
github.localhostexplicitly, should we support some environment variable option to specify that GH_HOST shouldn't be treated as an enterprise host?
That's a good question and adding such a feature would definitely make the solution more generic—for example, you could then use GH_HOST to point to a GitHub.com instance hosted elsewhere on your network than github.localhost. But, I'm not sure if it's worth adding a specialized environment variable just for this. If most dotcom developers consistently use github.localhost, then the change as you've made it right now is good enough. 👍
adonovan
left a comment
There was a problem hiding this comment.
Many thanks for making this fix!
|
Note: I will be adding more changes to this PR to support |
This pull request adds support for using
github.localhostas a non-enterprise host.When developing GitHub locally, the dev environment isn't necessarily a GHES dev environment. Currently the CLI assumes all hosts outside of
github.localhostare GHES instances, which causes issues when the dev environment expects API routes likehttps://api.github.localhostrather than the GHES format ofhttps://github.localhost/apiTo test this pull request, you'll need a local dev environment of GitHub. You can then set the
GH_HOSTenvironment variable to reach that local dev instance:Questions for reviewers
github.localhostexplicitly, should we support some environment variable option to specify thatGH_HOSTshouldn't be treated as an enterprise host?