Gitea Version
main (ea91028); the docs page is the current one on docs.gitea.com.
What happened?
For the pull_request_review_approved, pull_request_review_rejected and pull_request_review_comment webhooks, the docs say review.type is approved, rejected or comment (docs/usage/repository/webhooks.md in gitea/docs), and the ReviewPayload.Type comment in modules/structs/hook.go says the same.
The payload carries the full event name instead. PullRequestReview in services/webhook/notifier.go sets Type: string(reviewHookType), and reviewHookType is one of the HookEventPullRequestReview* constants, so an approval arrives as "type": "pull_request_review_approved". The Actions notifier in services/actions/notifier.go does the same.
A consumer that follows the docs and matches on approved never matches. Integrations that exist today already read the full names, so bringing the docs in line with the payload looks safer than changing the payload. The docs page and the struct comment both need the change.
How are you running Gitea?
Read from the source on main; it doesn't depend on the install.
Gitea Version
main (ea91028); the docs page is the current one on docs.gitea.com.
What happened?
For the
pull_request_review_approved,pull_request_review_rejectedandpull_request_review_commentwebhooks, the docs sayreview.typeisapproved,rejectedorcomment(docs/usage/repository/webhooks.mdin gitea/docs), and theReviewPayload.Typecomment inmodules/structs/hook.gosays the same.The payload carries the full event name instead.
PullRequestReviewinservices/webhook/notifier.gosetsType: string(reviewHookType), andreviewHookTypeis one of theHookEventPullRequestReview*constants, so an approval arrives as"type": "pull_request_review_approved". The Actions notifier inservices/actions/notifier.godoes the same.A consumer that follows the docs and matches on
approvednever matches. Integrations that exist today already read the full names, so bringing the docs in line with the payload looks safer than changing the payload. The docs page and the struct comment both need the change.How are you running Gitea?
Read from the source on main; it doesn't depend on the install.