Skip to content

Commit bb715ca

Browse files
authored
Revert "Revert CI: Claude review, trigger on git push [skip ci] (#8927)" (#8928)
This reverts commit b9e8d6e.
1 parent b9e8d6e commit bb715ca

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

‎.github/workflows/claude-review.yml‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
# Automated code review of pull requests using Claude
22
#
3-
# - PRs opened by members/owners/collaborators are reviewed automatically.
4-
# - For other PRs a member/owner/collaborator can request a review by writing
5-
# a PR comment containing "@claude review".
3+
# A member/owner/collaborator requests a review by writing a PR comment
4+
# containing "@claude review".
65
#
7-
# pull_request_target and issue_comment run the workflow file from the base
8-
# branch with access to secrets. The PR code is never checked out or executed.
6+
# pull_request_target is not used because the Claude GitHub App token exchange
7+
# rejects OIDC tokens from that event (401 "Invalid OIDC token").
8+
#
9+
# issue_comment runs the workflow file from the default branch with access to
10+
# secrets. The PR code is never checked out or executed.
911
name: claude-review
1012

1113
on:
12-
pull_request_target:
13-
types: [opened, synchronize, ready_for_review, reopened]
1414
issue_comment:
1515
types: [created]
1616

1717
jobs:
1818
review:
1919
if: |
20-
(github.event_name == 'pull_request_target' &&
21-
github.event.pull_request.draft == false &&
22-
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association)) ||
23-
(github.event_name == 'issue_comment' &&
24-
github.event.issue.pull_request &&
25-
contains(github.event.comment.body, '@claude review') &&
26-
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
20+
github.event.issue.pull_request &&
21+
contains(github.event.comment.body, '@claude review') &&
22+
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)
2723
2824
runs-on: ubuntu-24.04
2925

@@ -44,7 +40,7 @@ jobs:
4440
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
4541
prompt: |
4642
REPO: ${{ github.repository }}
47-
PR NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
43+
PR NUMBER: ${{ github.event.issue.number }}
4844
4945
Review this pull request. Focus on correctness bugs, potential
5046
false positives/false negatives in checkers, performance problems

0 commit comments

Comments
 (0)