Skip to content

Commit c87c0f7

Browse files
authored
Prevent url clipping for GHES instances (#1225)
Signed-off-by: Rob Bos <[email protected]>
1 parent 5b80fbc commit c87c0f7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

github/github.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ func (c *Client) ParseFromURL(baseRepoURL, repoName string) (RepoInfo, error) {
8585
if err != nil {
8686
return ret, fmt.Errorf("parsing base repo URL: %w", err)
8787
}
88-
89-
repoURL, err := baseURL.Parse(fmt.Sprintf("repos/%s", repoName))
90-
if err != nil {
91-
return ret, fmt.Errorf("parsing repo endpoint: %w", err)
92-
}
88+
repoURL := baseURL.JoinPath(fmt.Sprintf("repos/%s", repoName))
9389

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

0 commit comments

Comments
 (0)