diff options
Diffstat (limited to 'modules/webhook/dingtalk.go')
-rw-r--r-- | modules/webhook/dingtalk.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/webhook/dingtalk.go b/modules/webhook/dingtalk.go index fc99202a70..f2dd5a79ed 100644 --- a/modules/webhook/dingtalk.go +++ b/modules/webhook/dingtalk.go @@ -181,7 +181,7 @@ func getDingtalkPullRequestPayload(p *api.PullRequestPayload) (*DingtalkPayload, func getDingtalkPullRequestApprovalPayload(p *api.PullRequestPayload, event models.HookEventType) (*DingtalkPayload, error) { var text, title string switch p.Action { - case api.HookIssueSynchronized: + case api.HookIssueReviewed: action, err := parseHookPullRequestEventType(event) if err != nil { return nil, err @@ -261,15 +261,16 @@ func GetDingtalkPayload(p api.Payloader, event models.HookEventType, meta string return getDingtalkDeletePayload(p.(*api.DeletePayload)) case models.HookEventFork: return getDingtalkForkPayload(p.(*api.ForkPayload)) - case models.HookEventIssues: + case models.HookEventIssues, models.HookEventIssueAssign, models.HookEventIssueLabel, models.HookEventIssueMilestone: return getDingtalkIssuesPayload(p.(*api.IssuePayload)) - case models.HookEventIssueComment: + case models.HookEventIssueComment, models.HookEventPullRequestComment: return getDingtalkIssueCommentPayload(p.(*api.IssueCommentPayload)) case models.HookEventPush: return getDingtalkPushPayload(p.(*api.PushPayload)) - case models.HookEventPullRequest: + case models.HookEventPullRequest, models.HookEventPullRequestAssign, models.HookEventPullRequestLabel, + models.HookEventPullRequestMilestone, models.HookEventPullRequestSync: return getDingtalkPullRequestPayload(p.(*api.PullRequestPayload)) - case models.HookEventPullRequestApproved, models.HookEventPullRequestRejected, models.HookEventPullRequestComment: + case models.HookEventPullRequestReviewApproved, models.HookEventPullRequestReviewRejected, models.HookEventPullRequestReviewComment: return getDingtalkPullRequestApprovalPayload(p.(*api.PullRequestPayload), event) case models.HookEventRepository: return getDingtalkRepositoryPayload(p.(*api.RepositoryPayload)) |