Skip to content

Commit

Permalink
Fixed invalid default hostname for gh auth token
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jkstpierre authored Sep 18, 2023
1 parent 39a4511 commit be963e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func tokenFromGhCli(baseURL string) (string, error) {
}
hostname := ""
if baseURL == "" {
hostname = "api.github.com"
hostname = "github.com"
} else {
parsedURL, err := url.Parse(baseURL)
if err != nil {
Expand Down

0 comments on commit be963e5

Please sign in to comment.