fix: use correct base URL if not enterprise (#125)
This commit is contained in:
parent
662b3ddbc7
commit
287b77b470
1 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue