|
20 | 20 | # Auto-review for same-repo PRs |
21 | 21 | claude-review: |
22 | 22 | if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository |
23 | | - runs-on: ubuntu-latest |
| 23 | + runs-on: warp-ubuntu-latest-x64-8x |
24 | 24 | steps: |
25 | 25 | - uses: actions/checkout@v6 |
26 | 26 | with: |
|
55 | 55 | if: | |
56 | 56 | github.event_name == 'issue_comment' && |
57 | 57 | github.event.issue.pull_request && |
58 | | - contains(github.event.comment.body, '@claude review') |
59 | | - runs-on: ubuntu-latest |
| 58 | + contains(github.event.comment.body, '@claude review') && |
| 59 | + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) |
| 60 | + runs-on: warp-ubuntu-latest-x64-8x |
60 | 61 | steps: |
61 | 62 | - uses: actions/checkout@v6 |
62 | 63 | with: |
@@ -91,13 +92,20 @@ jobs: |
91 | 92 | - Only use inline comments for problems, not praise. |
92 | 93 |
|
93 | 94 | # General interactive mode - responds to @claude mentions (but NOT review requests on PRs) |
| 95 | + # Restricted to users with write access (OWNER, MEMBER, COLLABORATOR) |
94 | 96 | claude-response: |
95 | 97 | if: | |
96 | | - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude review')) || |
97 | | - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude review')) || |
98 | | - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && !contains(github.event.review.body, '@claude review')) || |
99 | | - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) |
100 | | - runs-on: ubuntu-latest |
| 98 | + ( |
| 99 | + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) || |
| 100 | + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association) || |
| 101 | + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association) |
| 102 | + ) && ( |
| 103 | + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) || |
| 104 | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || |
| 105 | + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude review')) || |
| 106 | + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && !contains(github.event.review.body, '@claude review')) |
| 107 | + ) |
| 108 | + runs-on: warp-ubuntu-latest-x64-8x |
101 | 109 | steps: |
102 | 110 | - uses: actions/checkout@v6 |
103 | 111 | with: |
|
0 commit comments