1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 01:57:20 +00:00

Update status check for all supported on.pull_request.types in Gitea (#33117)

Thanks @Zettat123
Follow #33116
Fix #33051

on.pull_request.types doc:

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request

on.pull_request.types added in this PR:
```
assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled
```

unsupported types in Gitea:
```
// Unsupported activity types:
// converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued
```

TODO:
- [x] add test
This commit is contained in:
yp05327
2025-01-08 02:58:47 +09:00
committed by GitHub
parent 0d7d2ed39d
commit 32d45ee069
4 changed files with 234 additions and 24 deletions

View File

@ -69,6 +69,10 @@ func (h HookEventType) Event() string {
return ""
}
func (h HookEventType) IsPullRequest() bool {
return h.Event() == "pull_request"
}
// HookType is the type of a webhook
type HookType = string