From a864b1636fc7d0b59b2fdb1ebf0a9eb25381fc2b Mon Sep 17 00:00:00 2001 From: Vlad Mocanu Date: Thu, 26 Feb 2026 10:21:18 +0200 Subject: [PATCH] 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 --- .forgejo/workflows/claude.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/claude.yml b/.forgejo/workflows/claude.yml index b962cf2..ea81a3d 100644 --- a/.forgejo/workflows/claude.yml +++ b/.forgejo/workflows/claude.yml @@ -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: