]> source.dussan.org Git - gitea.git/commitdiff
Fix wechatwork webhook sends empty content in PR review (#21762) (#22440)
authorzeripath <art27@cantab.net>
Sat, 14 Jan 2023 03:37:18 +0000 (03:37 +0000)
committerGitHub <noreply@github.com>
Sat, 14 Jan 2023 03:37:18 +0000 (11:37 +0800)
Backport #21762

Wechatwork webhook is sending the following string for pull request
reviews:

``` markdown
>
```

This commit fixes this problem.

Co-authored-by: Jim Kirisame <jim@lotlab.org>
services/webhook/wechatwork.go

index 5344ccaa22db7c5b5cc109c78b0bf80a8713a390..acaa12253bc8004a639f6ccb83bb63d02a66c311 100644 (file)
@@ -139,7 +139,7 @@ func (f *WechatworkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloade
 func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event webhook_model.HookEventType) (api.Payloader, error) {
        var text, title string
        switch p.Action {
-       case api.HookIssueSynchronized:
+       case api.HookIssueReviewed:
                action, err := parseHookPullRequestEventType(event)
                if err != nil {
                        return nil, err