mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 15:37:35 +00:00
Backport #23650 by @Zettat123 `HookEventType` of pull request review comments should be `HookEventPullRequestReviewComment` but some event types are `HookEventPullRequestComment` now. Co-authored-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
parent
a9b4aa4cc4
commit
6705b215db
|
@ -264,7 +264,7 @@ func (n *actionsNotifier) NotifyPullRequestReview(ctx context.Context, pr *issue
|
||||||
case issues_model.ReviewTypeApprove:
|
case issues_model.ReviewTypeApprove:
|
||||||
reviewHookType = webhook_module.HookEventPullRequestReviewApproved
|
reviewHookType = webhook_module.HookEventPullRequestReviewApproved
|
||||||
case issues_model.ReviewTypeComment:
|
case issues_model.ReviewTypeComment:
|
||||||
reviewHookType = webhook_module.HookEventPullRequestComment
|
reviewHookType = webhook_module.HookEventPullRequestReviewComment
|
||||||
case issues_model.ReviewTypeReject:
|
case issues_model.ReviewTypeReject:
|
||||||
reviewHookType = webhook_module.HookEventPullRequestReviewRejected
|
reviewHookType = webhook_module.HookEventPullRequestReviewRejected
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -209,7 +209,7 @@ func (d *DiscordPayload) Review(p *api.PullRequestPayload, event webhook_module.
|
||||||
color = greenColor
|
color = greenColor
|
||||||
case webhook_module.HookEventPullRequestReviewRejected:
|
case webhook_module.HookEventPullRequestReviewRejected:
|
||||||
color = redColor
|
color = redColor
|
||||||
case webhook_module.HookEventPullRequestComment:
|
case webhook_module.HookEventPullRequestReviewComment:
|
||||||
color = greyColor
|
color = greyColor
|
||||||
default:
|
default:
|
||||||
color = yellowColor
|
color = yellowColor
|
||||||
|
@ -277,7 +277,7 @@ func parseHookPullRequestEventType(event webhook_module.HookEventType) (string,
|
||||||
return "approved", nil
|
return "approved", nil
|
||||||
case webhook_module.HookEventPullRequestReviewRejected:
|
case webhook_module.HookEventPullRequestReviewRejected:
|
||||||
return "rejected", nil
|
return "rejected", nil
|
||||||
case webhook_module.HookEventPullRequestComment:
|
case webhook_module.HookEventPullRequestReviewComment:
|
||||||
return "comment", nil
|
return "comment", nil
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -223,7 +223,7 @@ func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event webhook_module.
|
||||||
color = greenColor
|
color = greenColor
|
||||||
case webhook_module.HookEventPullRequestReviewRejected:
|
case webhook_module.HookEventPullRequestReviewRejected:
|
||||||
color = redColor
|
color = redColor
|
||||||
case webhook_module.HookEventPullRequestComment:
|
case webhook_module.HookEventPullRequestReviewComment:
|
||||||
color = greyColor
|
color = greyColor
|
||||||
default:
|
default:
|
||||||
color = yellowColor
|
color = yellowColor
|
||||||
|
|
|
@ -685,7 +685,7 @@ func (m *webhookNotifier) NotifyPullRequestReview(ctx context.Context, pr *issue
|
||||||
case issues_model.ReviewTypeApprove:
|
case issues_model.ReviewTypeApprove:
|
||||||
reviewHookType = webhook_module.HookEventPullRequestReviewApproved
|
reviewHookType = webhook_module.HookEventPullRequestReviewApproved
|
||||||
case issues_model.ReviewTypeComment:
|
case issues_model.ReviewTypeComment:
|
||||||
reviewHookType = webhook_module.HookEventPullRequestComment
|
reviewHookType = webhook_module.HookEventPullRequestReviewComment
|
||||||
case issues_model.ReviewTypeReject:
|
case issues_model.ReviewTypeReject:
|
||||||
reviewHookType = webhook_module.HookEventPullRequestReviewRejected
|
reviewHookType = webhook_module.HookEventPullRequestReviewRejected
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue