From dd1555b1d17966cb58500676d79a181c53bb6c12 Mon Sep 17 00:00:00 2001 From: Augusto Melo <4723788+augustomelo@users.noreply.github.com> Date: Sun, 23 Apr 2023 16:02:50 +0100 Subject: [PATCH] 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 --- approval.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/approval.go b/approval.go index a720aef..a34c647 100644 --- a/approval.go +++ b/approval.go @@ -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 {