mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Fix review webhooks (#8570)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
committed by
Lunny Xiao
parent
d44053eeda
commit
7c4c01c0fd
@@ -413,7 +413,17 @@ func getDiscordPullRequestApprovalPayload(p *api.PullRequestPayload, meta *Disco
|
||||
|
||||
title = fmt.Sprintf("[%s] Pull request review %s: #%d %s", p.Repository.FullName, action, p.Index, p.PullRequest.Title)
|
||||
text = p.PullRequest.Body
|
||||
color = warnColor
|
||||
|
||||
switch event {
|
||||
case HookEventPullRequestApproved:
|
||||
color = successColor
|
||||
case HookEventPullRequestRejected:
|
||||
color = failedColor
|
||||
case HookEventPullRequestComment:
|
||||
fallthrough
|
||||
default:
|
||||
color = warnColor
|
||||
}
|
||||
}
|
||||
|
||||
return &DiscordPayload{
|
||||
|
Reference in New Issue
Block a user