Skip to content

Commit f0b958e

Browse files
committed
ci: skip claude code review for fork PRs
Fork PRs cannot authenticate with the claude-code-action because: 1. The `pull_request` event from forks does not expose repository secrets or OIDC tokens (GitHub security restriction), so both `anthropic_api_key` and the GitHub App token exchange fail. 2. Switching to `pull_request_target` (which does have access to secrets and OIDC) also does not work because Anthropic's OIDC token exchange endpoint rejects `pull_request_target` event types (anthropics/claude-code-action#713). Until the upstream action supports fork PRs, skip the review to avoid noisy CI failures on every external contribution.
1 parent a7ddfda commit f0b958e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77

88
jobs:
99
claude-review:
10+
# Fork PRs don't have access to secrets or OIDC tokens, so the action
11+
# cannot authenticate. See https://github.com/anthropics/claude-code-action/issues/339
12+
if: github.event.pull_request.head.repo.fork == false
1013
runs-on: ubuntu-latest
1114
permissions:
1215
contents: read

0 commit comments

Comments
 (0)