Skip to content

Commit

Permalink
fix: use correct base URL if not enterprise (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqu authored Jun 19, 2024
1 parent 662b3dd commit 287b77b
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 287b77b

Please sign in to comment.