Skip to content

Commit

Permalink
fix: use correct base URL if not enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqu authored Jun 13, 2024
1 parent 662b3dd commit 8fa145c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion approval.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ func newApprovalEnvironment(client *github.Client, repoFullName, repoOwner strin
}

func (a approvalEnvironment) runURL() string {
return fmt.Sprintf("%s%s/actions/runs/%d", a.client.BaseURL.String(), a.repoFullName, a.runID)
baseUrl := a.client.BaseURL.String()
if strings.Contains(baseUrl, "github.com") {
baseUrl := "https://github.com/"
}
return fmt.Sprintf("%s%s/actions/runs/%d", baseUrl, a.repoFullName, a.runID)
}

func (a *approvalEnvironment) createApprovalIssue(ctx context.Context) error {
Expand Down

0 comments on commit 8fa145c

Please sign in to comment.