Skip to content

Commit

Permalink
Prevent url clipping for GHES instances (#1225)
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Bos <rajbos@users.noreply.github.com>
  • Loading branch information
rajbos committed Aug 1, 2023
1 parent 5b80fbc commit c87c0f7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions github/github.go
Expand Up @@ -85,11 +85,7 @@ func (c *Client) ParseFromURL(baseRepoURL, repoName string) (RepoInfo, error) {
if err != nil {
return ret, fmt.Errorf("parsing base repo URL: %w", err)
}

repoURL, err := baseURL.Parse(fmt.Sprintf("repos/%s", repoName))
if err != nil {
return ret, fmt.Errorf("parsing repo endpoint: %w", err)
}
repoURL := baseURL.JoinPath(fmt.Sprintf("repos/%s", repoName))

log.Printf("getting repo info from URL: %s", repoURL.String())
//nolint:noctx
Expand Down

0 comments on commit c87c0f7

Please sign in to comment.