Skip to content

Commit 61df235

Browse files
committed
chore(ci): Run code review only on main repo
1 parent 5ef0eae commit 61df235

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
jobs:
1414
claude-review:
1515
runs-on: ubuntu-latest
16+
# Fork PRs can't get id-token/secrets on pull_request events (GitHub security policy),
17+
# so the OIDC flow fails. Auto-run only on same-repo PRs; use workflow_dispatch for forks.
18+
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
1619
permissions:
1720
contents: read
1821
pull-requests: write
@@ -24,6 +27,7 @@ jobs:
2427
uses: actions/checkout@v6
2528
with:
2629
fetch-depth: 1
30+
ref: ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/merge', inputs.pr_number) }}
2731

2832
- name: Run Claude Code Review
2933
id: claude-review

0 commit comments

Comments
 (0)