mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-02 15:09:33 -05:00
Add pull request review request webhook event (#26401)
Add webhook events for pull request review requests - Fixes #26371 - Added support for the "Pull request review requested" and "Pull request review request removed" webhook events. - Updated the `getPullRequestPayloadInfo` function in `general.go` to handle these new webhook events. # Before  # After  Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
c2e0143bfe
commit
220f236ff5
@ -131,6 +131,10 @@ func getPullRequestPayloadInfo(p *api.PullRequestPayload, linkFormatter linkForm
|
|||||||
case api.HookIssueReviewed:
|
case api.HookIssueReviewed:
|
||||||
text = fmt.Sprintf("[%s] Pull request reviewed: %s", repoLink, titleLink)
|
text = fmt.Sprintf("[%s] Pull request reviewed: %s", repoLink, titleLink)
|
||||||
attachmentText = p.Review.Content
|
attachmentText = p.Review.Content
|
||||||
|
case api.HookIssueReviewRequested:
|
||||||
|
text = fmt.Sprintf("[%s] Pull request review requested: %s", repoLink, titleLink)
|
||||||
|
case api.HookIssueReviewRequestRemoved:
|
||||||
|
text = fmt.Sprintf("[%s] Pull request review request removed: %s", repoLink, titleLink)
|
||||||
}
|
}
|
||||||
if withSender {
|
if withSender {
|
||||||
text += fmt.Sprintf(" by %s", linkFormatter(setting.AppURL+p.Sender.UserName, p.Sender.UserName))
|
text += fmt.Sprintf(" by %s", linkFormatter(setting.AppURL+p.Sender.UserName, p.Sender.UserName))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user