Fix for GHES when authorized through GitHub App with GITHUB_URL instead of GITHUB_ENTERPRISE_URL (#2464)

Ref #2457
This commit is contained in:
mspasoje 2023-04-26 21:53:22 -07:00 committed by GitHub
parent 942f773fef
commit aa50b62c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,8 @@ func (c *Config) NewClient() (*Client, error) {
return nil, fmt.Errorf("enterprise url incorrect: %v", err)
}
tr.BaseURL = githubAPIURL
} else if c.URL != "" && tr.BaseURL != c.URL {
tr.BaseURL = c.URL
}
transport = tr
}