]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: React to issue_comment in claude review workflow
authorDaan De Meyer <daan@amutable.com>
Fri, 6 Mar 2026 14:25:53 +0000 (15:25 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 6 Mar 2026 14:27:30 +0000 (15:27 +0100)
issue_comment is the trigger that fires on regular pull request comments,
so we have to trigger the review workflow on that as well.

.github/workflows/claude-review.yml

index bba7bdd1b57519768acf06534332b78014119398..e78ffbcfbee8a15d8f156112db1ef8349a739936 100644 (file)
@@ -5,6 +5,10 @@
 name: Claude Review
 
 on:
+  # Strangely enough you have to use issue_comment to react to regular comments on PRs.
+  # See https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_comment-use-issue_comment.
+  issue_comment:
+    types: [created]
   pull_request_review_comment:
     types: [created]
   pull_request_review:
@@ -18,6 +22,9 @@ jobs:
 
     if: |
       github.repository_owner == 'systemd' &&
+      ((github.event_name == 'issue_comment' &&
+        contains(github.event.comment.body, '@claude') &&
+        contains(fromJSON('["MEMBER","OWNER","COLLABORATOR"]'), github.event.comment.author_association)) ||
        (github.event_name == 'pull_request_review_comment' &&
         contains(github.event.comment.body, '@claude') &&
         contains(fromJSON('["MEMBER","OWNER","COLLABORATOR"]'), github.event.comment.author_association)) ||