mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
Fix incorrect HookEventType
of pull request review comments (#23650)
`HookEventType` of pull request review comments should be `HookEventPullRequestReviewComment` but some event types are `HookEventPullRequestComment` now.
This commit is contained in:
parent
4acf0214b1
commit
9e04627aca
4 changed files with 5 additions and 5 deletions
|
@ -264,7 +264,7 @@ func (n *actionsNotifier) NotifyPullRequestReview(ctx context.Context, pr *issue
|
|||
case issues_model.ReviewTypeApprove:
|
||||
reviewHookType = webhook_module.HookEventPullRequestReviewApproved
|
||||
case issues_model.ReviewTypeComment:
|
||||
reviewHookType = webhook_module.HookEventPullRequestComment
|
||||
reviewHookType = webhook_module.HookEventPullRequestReviewComment
|
||||
case issues_model.ReviewTypeReject:
|
||||
reviewHookType = webhook_module.HookEventPullRequestReviewRejected
|
||||
default:
|
||||
|
|
|
@ -209,7 +209,7 @@ func (d *DiscordPayload) Review(p *api.PullRequestPayload, event webhook_module.
|
|||
color = greenColor
|
||||
case webhook_module.HookEventPullRequestReviewRejected:
|
||||
color = redColor
|
||||
case webhook_module.HookEventPullRequestComment:
|
||||
case webhook_module.HookEventPullRequestReviewComment:
|
||||
color = greyColor
|
||||
default:
|
||||
color = yellowColor
|
||||
|
@ -277,7 +277,7 @@ func parseHookPullRequestEventType(event webhook_module.HookEventType) (string,
|
|||
return "approved", nil
|
||||
case webhook_module.HookEventPullRequestReviewRejected:
|
||||
return "rejected", nil
|
||||
case webhook_module.HookEventPullRequestComment:
|
||||
case webhook_module.HookEventPullRequestReviewComment:
|
||||
return "comment", nil
|
||||
|
||||
default:
|
||||
|
|
|
@ -223,7 +223,7 @@ func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event webhook_module.
|
|||
color = greenColor
|
||||
case webhook_module.HookEventPullRequestReviewRejected:
|
||||
color = redColor
|
||||
case webhook_module.HookEventPullRequestComment:
|
||||
case webhook_module.HookEventPullRequestReviewComment:
|
||||
color = greyColor
|
||||
default:
|
||||
color = yellowColor
|
||||
|
|
|
@ -685,7 +685,7 @@ func (m *webhookNotifier) NotifyPullRequestReview(ctx context.Context, pr *issue
|
|||
case issues_model.ReviewTypeApprove:
|
||||
reviewHookType = webhook_module.HookEventPullRequestReviewApproved
|
||||
case issues_model.ReviewTypeComment:
|
||||
reviewHookType = webhook_module.HookEventPullRequestComment
|
||||
reviewHookType = webhook_module.HookEventPullRequestReviewComment
|
||||
case issues_model.ReviewTypeReject:
|
||||
reviewHookType = webhook_module.HookEventPullRequestReviewRejected
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue