diff options
author | Zettat123 <zettat123@gmail.com> | 2023-03-24 13:13:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 13:13:04 +0800 |
commit | 9e04627acaaa853e5269f98f53f2615077cfb028 (patch) | |
tree | 4953dfc594e35b6276f1cb7b3ab52bfefe7842f2 /services | |
parent | 4acf0214b1bbee1430b753cd2ca45527d61555e9 (diff) | |
download | gitea-9e04627acaaa853e5269f98f53f2615077cfb028.tar.gz gitea-9e04627acaaa853e5269f98f53f2615077cfb028.zip |
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.
Diffstat (limited to 'services')
-rw-r--r-- | services/actions/notifier.go | 2 | ||||
-rw-r--r-- | services/webhook/discord.go | 4 | ||||
-rw-r--r-- | services/webhook/msteams.go | 2 | ||||
-rw-r--r-- | services/webhook/notifier.go | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/services/actions/notifier.go b/services/actions/notifier.go index cdf9087fef..90eed83eff 100644 --- a/services/actions/notifier.go +++ b/services/actions/notifier.go @@ -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: diff --git a/services/webhook/discord.go b/services/webhook/discord.go index 014d409ce7..02f0fb8720 100644 --- a/services/webhook/discord.go +++ b/services/webhook/discord.go @@ -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: diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go index 03d92821b9..60ef334ded 100644 --- a/services/webhook/msteams.go +++ b/services/webhook/msteams.go @@ -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 diff --git a/services/webhook/notifier.go b/services/webhook/notifier.go index b023717cd2..1f7cb8d988 100644 --- a/services/webhook/notifier.go +++ b/services/webhook/notifier.go @@ -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: |