Skip to content

Commit be963e5

Browse files
authored
Fixed invalid default hostname for gh auth token
Currently in the event that no base_url is given to the provider configuration, the tokenFromGhCli() function will set a default hostname of "api.github.com" which is invalid for the "gh auth token" cli command. Instead, the proper default hostname should be "github.com" which is correct and works.
1 parent 39a4511 commit be963e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func tokenFromGhCli(baseURL string) (string, error) {
398398
}
399399
hostname := ""
400400
if baseURL == "" {
401-
hostname = "api.github.com"
401+
hostname = "github.com"
402402
} else {
403403
parsedURL, err := url.Parse(baseURL)
404404
if err != nil {

0 commit comments

Comments
 (0)