mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
Fix comments webhook panic (#12046)
* Fix webhook comment handling type cast panic * Handle HookIssueReviewed action in webhook Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
9ef2f62a79
commit
ebc35f2b2e
8 changed files with 39 additions and 9 deletions
|
@ -206,7 +206,11 @@ func GetTelegramPayload(p api.Payloader, event models.HookEventType, meta string
|
|||
case models.HookEventIssues, models.HookEventIssueAssign, models.HookEventIssueLabel, models.HookEventIssueMilestone:
|
||||
return getTelegramIssuesPayload(p.(*api.IssuePayload))
|
||||
case models.HookEventIssueComment, models.HookEventPullRequestComment:
|
||||
return getTelegramIssueCommentPayload(p.(*api.IssueCommentPayload))
|
||||
pl, ok := p.(*api.IssueCommentPayload)
|
||||
if ok {
|
||||
return getTelegramIssueCommentPayload(pl)
|
||||
}
|
||||
return getTelegramPullRequestPayload(p.(*api.PullRequestPayload))
|
||||
case models.HookEventPush:
|
||||
return getTelegramPushPayload(p.(*api.PushPayload))
|
||||
case models.HookEventPullRequest, models.HookEventPullRequestAssign, models.HookEventPullRequestLabel,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue