1
0
Fork 0
forked from forgejo/forgejo

Fix release URL in webhooks (#27182) (#27184)

Backport #27182 by @jolheiser

Resolves #27180

`URL` points to the API URL, `HTMLURL` points to the web page.

Notably, however, for PRs they are the same URL. I switched them to use
HTMLURL to match the rest of the codebase terminology.

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
(cherry picked from commit d8583edfe7)
This commit is contained in:
Giteabot 2023-09-22 07:59:27 +08:00 committed by Earl Warren
parent f8bf284794
commit 1b1f878204
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
9 changed files with 9 additions and 9 deletions

View file

@ -223,7 +223,7 @@ func (s *SlackPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, er
attachments = append(attachments, SlackAttachment{
Color: fmt.Sprintf("%x", color),
Title: issueTitle,
TitleLink: p.PullRequest.URL,
TitleLink: p.PullRequest.HTMLURL,
Text: attachmentText,
})
}