mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-23 14:00:03 +02:00
Fix review webhooks (#8570)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
d44053eeda
commit
7c4c01c0fd
3 changed files with 40 additions and 16 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue