docs: document Forgejo event behavior in workflow and trigger.ts

Add inline comments explaining:
- Forgejo never fires pull_request_review (sends pull_request_comment)
- Why workflow if-condition cannot gate on @claude for these events
  (payload fields are empty, confirmed by run 12084 being skipped)
- The @claude check is handled in trigger.ts via payload inspection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-26 10:45:09 +02:00
1 parent 231a31ca39
commit 401c35fdd2
1 file changed
+8
+8
View File
@@ -7,6 +7,8 @@ on:
types: [created] types: [created]
issues: issues:
types: [opened, assigned, labeled] types: [opened, assigned, labeled]
# Forgejo never fires pull_request_review — it sends pull_request_comment
# for both review comments AND full reviews. Kept for GitHub compatibility.
pull_request_review: pull_request_review:
types: [submitted] types: [submitted]
@@ -24,7 +26,13 @@ jobs:
# despite action being 'labeled'). Let all through; trigger.ts validates. # despite action being 'labeled'). Let all through; trigger.ts validates.
if: >- if: >-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
# Forgejo collapses both pull_request_review_comment AND pull_request_review
# into pull_request_comment. We cannot gate on @claude here because Forgejo's
# webhook payload does not populate github.event.comment.body or
# github.event.review.body for these events (tested: run 12084 was skipped).
# The @claude check is handled in trigger.ts which reads the actual payload.
(github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request_comment') || (github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request_comment') ||
# This condition only fires on GitHub (Forgejo never sends pull_request_review).
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues') (github.event_name == 'issues')
runs-on: grunt runs-on: grunt