fix(#75): display corect base URL if using GHE (#90)

It was displaying the GH URL even though the GHE was configured, using the client.baseURL will correctly display a
correct value.

https://pkg.go.dev/github.com/google/go-github/v50/github#Client
This commit is contained in:
Augusto Melo 2023-04-23 16:02:50 +01:00 committed by GitHub
parent a824dad59a
commit dd1555b1d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ func newApprovalEnvironment(client *github.Client, repoFullName, repoOwner strin
}
func (a approvalEnvironment) runURL() string {
return fmt.Sprintf("https://github.com/%s/actions/runs/%d", a.repoFullName, a.runID)
return fmt.Sprintf("%s%s/actions/runs/%d", a.client.BaseURL.String(), a.repoFullName, a.runID)
}
func (a *approvalEnvironment) createApprovalIssue(ctx context.Context) error {