@@ -24,24 +24,29 @@ jobs:
2424
2525 if : |
2626 (
27- github.event_name == 'pull_request_target' ||
27+ github.event_name == 'pull_request_target' &&
2828 (
29- (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') &&
30- contains(github.event.comment.body, '@claude') &&
31- (
32- github.event.comment.author_association == 'OWNER' ||
33- github.event.comment.author_association == 'MEMBER' ||
34- github.event.comment.author_association == 'COLLABORATOR'
35- )
36- ) ||
29+ github.event.pull_request.author_association == 'OWNER' ||
30+ github.event.pull_request.author_association == 'MEMBER' ||
31+ github.event.pull_request.author_association == 'COLLABORATOR'
32+ )
33+ ) ||
34+ (
35+ (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') &&
36+ contains(github.event.comment.body, '@claude') &&
37+ (
38+ github.event.comment.author_association == 'OWNER' ||
39+ github.event.comment.author_association == 'MEMBER' ||
40+ github.event.comment.author_association == 'COLLABORATOR'
41+ )
42+ ) ||
43+ (
44+ github.event_name == 'pull_request_review' &&
45+ contains(github.event.review.body, '@claude') &&
3746 (
38- github.event_name == 'pull_request_review' &&
39- contains(github.event.review.body, '@claude') &&
40- (
41- github.event.review.author_association == 'OWNER' ||
42- github.event.review.author_association == 'MEMBER' ||
43- github.event.review.author_association == 'COLLABORATOR'
44- )
47+ github.event.review.author_association == 'OWNER' ||
48+ github.event.review.author_association == 'MEMBER' ||
49+ github.event.review.author_association == 'COLLABORATOR'
4550 )
4651 )
4752
5055 uses : actions/checkout@v4
5156 with :
5257 fetch-depth : 0
53- ref : ${{ github.event.pull_request.head.sha }}
58+ ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
59+
60+ - name : Checkout PR Branch (for comments)
61+ if : ${{ github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' }}
62+ env :
63+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64+ run : |
65+ gh pr checkout ${{ github.event.issue.number || github.event.pull_request.number }}
5466
5567 - name : PR Review with Progress Tracking
5668 uses : anthropics/claude-code-action@v1
0 commit comments