Skip to content

Commit

Permalink
fix(#75): display corect base URL if using GHE (#90)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
augustomelo committed Apr 23, 2023
1 parent a824dad commit dd1555b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion approval.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dd1555b

Please sign in to comment.