]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: Run claude-review workflow automatically on trusted PRs
authorDaan De Meyer <daan@amutable.com>
Mon, 16 Mar 2026 09:36:33 +0000 (10:36 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 16 Mar 2026 11:12:46 +0000 (12:12 +0100)
.github/workflows/claude-review.yml

index 0a90a89ca4728b7a3140027c6792435b8d2e7a98..861613e65d8449861239c74464acc538fe79f80e 100644 (file)
@@ -10,6 +10,8 @@
 name: Claude Review
 
 on:
+  pull_request_target:
+    types: [opened, synchronize, reopened]
   # 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:
@@ -30,7 +32,10 @@ jobs:
 
     if: |
       github.repository_owner == 'systemd' &&
-      ((github.event_name == 'issue_comment' &&
+      ((github.event_name == 'pull_request_target' &&
+        contains(fromJSON('["MEMBER","OWNER","COLLABORATOR"]'), github.event.pull_request.author_association) &&
+        github.event.pull_request.user.login != 'YHNdnzj') ||
+       (github.event_name == 'issue_comment' &&
         github.event.issue.pull_request &&
         contains(github.event.comment.body, '@claude review') &&
         contains(fromJSON('["MEMBER","OWNER","COLLABORATOR"]'), github.event.comment.author_association)) ||