summaryrefslogtreecommitdiffstats
path: root/modules/webhook/feishu.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/webhook/feishu.go')
-rw-r--r--modules/webhook/feishu.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/webhook/feishu.go b/modules/webhook/feishu.go
index 57eb909c48..4beda9014c 100644
--- a/modules/webhook/feishu.go
+++ b/modules/webhook/feishu.go
@@ -183,13 +183,17 @@ func GetFeishuPayload(p api.Payloader, event models.HookEventType, meta string)
return getFeishuForkPayload(p.(*api.ForkPayload))
case models.HookEventIssues:
return getFeishuIssuesPayload(p.(*api.IssuePayload))
- case models.HookEventIssueComment:
- return getFeishuIssueCommentPayload(p.(*api.IssueCommentPayload))
+ case models.HookEventIssueComment, models.HookEventPullRequestComment:
+ pl, ok := p.(*api.IssueCommentPayload)
+ if ok {
+ return getFeishuIssueCommentPayload(pl)
+ }
+ return getFeishuPullRequestPayload(p.(*api.PullRequestPayload))
case models.HookEventPush:
return getFeishuPushPayload(p.(*api.PushPayload))
case models.HookEventPullRequest:
return getFeishuPullRequestPayload(p.(*api.PullRequestPayload))
- case models.HookEventPullRequestReviewApproved, models.HookEventPullRequestReviewRejected, models.HookEventPullRequestComment:
+ case models.HookEventPullRequestReviewApproved, models.HookEventPullRequestReviewRejected:
return getFeishuPullRequestApprovalPayload(p.(*api.PullRequestPayload), event)
case models.HookEventRepository:
return getFeishuRepositoryPayload(p.(*api.RepositoryPayload))