forgejo/modules
Zettat123 73894eda79
Fix mismatch between hook events and github event types (#24048) (#24091)
Backport https://github.com/go-gitea/gitea/pull/24048

Some workflow trigger events can have multiple activity types, such as
`issues` and `pull_request`, and user can specify which types can
trigger the workflow. See GitHub documentation:
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows

Now some hook events cannot match the workflow trigger events correctly
because we don't check the activity types. For example,
`pull_request_label` is an individual hook event. But there isn't a
`pull_request_label` workflow trigger event, we can only use
`pull_request` event's `label` activity type. If we don't check the
activity types, the workflows without the `label` activity type may be
triggered by the `pull_request_label` event by mistake. We need to
improve the match logic.

- [x] [`issues`
](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues)
- [x]
[`issue_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment)
- [x]
[`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request)
- [x]
[`pull_request_review`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review)
- [x]
[`pull_request_review_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review_comment)
- [x]
[`release`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release)
- [x]
[`registry_package`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#registry_package)
2023-04-14 08:07:42 +02:00
..
actions Fix mismatch between hook events and github event types (#24048) (#24091) 2023-04-14 08:07:42 +02:00
activitypub
analyze
auth [SECURITY] default to pbkdf2 with 320,000 iterations 2023-04-11 23:49:19 +02:00
avatar
base
cache
charset
container
context [BRANDING] X-Forgejo-OTP can be used instead of X-Gitea-OTP 2023-04-12 01:22:28 +02:00
csv
doctor
emoji
eventsource
generate
git Remove Repository.getFilesChanged to fix Actions paths and paths-ignore filter (#23920) (#23969) 2023-04-08 16:16:21 +08:00
gitgraph
graceful
hcaptcha
highlight
hostmatcher
html
httpcache [BRANDING] add X-Forgejo-* headers 2023-04-12 01:18:29 +02:00
httplib
indexer
issue/template
json
label Make label templates have consistent behavior and priority (#23749) (#24071) 2023-04-14 08:07:42 +02:00
lfs
log
markup
mcaptcha
metrics
migration
mirror
nosql
notification
options
packages
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Make label templates have consistent behavior and priority (#23749) (#24071) 2023-04-14 08:07:42 +02:00
secret
session Use Get/Set instead of Rename when Regenerate session id (#23975) (#23983) 2023-04-07 14:21:20 -05:00
setting [BRANDING] alias {FORGEJO,GITEA}_{CUSTOM,WORK_DIR} 2023-04-12 01:22:27 +02:00
sitemap
ssh
storage
structs [BRANDING] define the forgejo webhook type 2023-04-12 01:18:29 +02:00
svg
sync
system
templates Fix custom mailer template on Windows (#24081) 2023-04-14 08:07:42 +02:00
test
timeutil
translation
turnstile
typesniffer
updatechecker [PRIVACY] Add a DNS method to fetch new updates 2023-04-12 01:17:34 +02:00
upload
uri
user
util
validation
watcher
web
webhook [BRANDING] define the forgejo webhook type 2023-04-12 01:18:29 +02:00