fix: move comments out of workflow if: expression block

Forgejo runner's expression parser rejects '#' characters inside
if: | blocks (run 52778: "unexpected character '#' while lexing
expression"). Move all comments above the if: key and switch from
block scalar (|) to folded scalar (>-) to avoid multiline issues.

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:21:23 +02:00
1 parent 414c7053eb
commit a864b1636f
1 file changed
+8 -4
+8 -4
View File
@@ -15,13 +15,17 @@ concurrency:
jobs:
claude:
if: |
# Forgejo workflow if: limitations (expression parser rejects '#' comments):
# - pull_request_review_comment / pull_request_comment: Forgejo collapses both
# review comments and full reviews into pull_request_comment. Cannot gate on
# @claude here — payload fields are empty (run 12084). Check in trigger.ts.
# - pull_request_review: Only fires on GitHub, dead code on Forgejo.
# - issues: Forgejo does not populate github.event.action (run 12061 skipped
# despite action being 'labeled'). Let all through; trigger.ts validates.
if: >-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request_comment') ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
# Forgejo does not populate github.event.action in the workflow if: context for
# issues events (run 12061 was skipped despite action being 'labeled'). Let all
# issues events through — trigger.ts validates label/assignee/mention checks.
(github.event_name == 'issues')
runs-on: grunt
steps: