From aa50b62c01fc1dfdec7da03daac79a1f2fc33b4f Mon Sep 17 00:00:00 2001 From: mspasoje <129410785+mspasoje@users.noreply.github.com> Date: Wed, 26 Apr 2023 21:53:22 -0700 Subject: [PATCH] Fix for GHES when authorized through GitHub App with GITHUB_URL instead of GITHUB_ENTERPRISE_URL (#2464) Ref #2457 --- github/github.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github/github.go b/github/github.go index 3d7251e4..f5d710d3 100644 --- a/github/github.go +++ b/github/github.go @@ -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 }