You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I have an admittedly niche problem - I'm working on a CLI extension against github.localhost, which means setting GH_HOST=github.localhost for each command. Calling isEnterprise returns true in that case, because it is not github.com:
As far as I can tell, there's no way for me to say "use GH_HOST, but also use api.<GH_HOST> instead of <GH_HOST>/api/v3". Is that correct, or is there a patch needed here? Happy to open a PR adding an exception for github.localhost if that makes sense, or some more consistent way of setting the full URL?
FWIW, I did think that maybe have GH_HOST=http://api.github.localhost would work, but that gives:
Post "https://http//api.github.localhost/api/v3/repos/:owner/:repo/<REDACTED>"
The text was updated successfully, but these errors were encountered:
@JasonEtco@mislav Yup, we should port over the localhost handling in the hostname normalization logic, it was just an oversite that it isn't already there. It if it isn't super urgent to get this fixed, to avoid conflicts, perhaps we can add it after #44 and #45 land since those PR's change the location of normalization code.
Hello! I have an admittedly niche problem - I'm working on a CLI extension against
github.localhost
, which means settingGH_HOST=github.localhost
for each command. CallingisEnterprise
returnstrue
in that case, because it is notgithub.com
:go-gh/internal/config/config.go
Lines 110 to 112 in 9dbbfe2
That results in an incorrect (and un-fixable) URL here:
go-gh/internal/api/rest_client.go
Lines 112 to 117 in 9dbbfe2
As far as I can tell, there's no way for me to say "use
GH_HOST
, but also useapi.<GH_HOST>
instead of<GH_HOST>/api/v3
". Is that correct, or is there a patch needed here? Happy to open a PR adding an exception forgithub.localhost
if that makes sense, or some more consistent way of setting the full URL?FWIW, I did think that maybe have
GH_HOST=http://api.github.localhost
would work, but that gives:The text was updated successfully, but these errors were encountered: