fix: Skip Claude Code actions on fork PRs#182
Merged
rdmueller merged 1 commit intodocToolchain:mainfrom Jan 26, 2026
Merged
Conversation
- claude-code-review.yml: Skip entirely for fork PRs (no secrets) - claude.yml: Skip PR review events from forks * issue_comment: Allow (will fail gracefully if from fork) * pull_request_review_comment: Skip if fork * pull_request_review: Skip if fork * issues: Allow (not fork-specific) Prevents workflow failures on fork PRs due to missing ANTHROPIC_API_KEY. Condition: github.event.pull_request.head.repo.full_name == github.repository
d2ecfe9 to
4690535
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevents Claude Code GitHub Actions from running on pull requests from forks, where they would fail due to missing
ANTHROPIC_API_KEYsecret.Problem
When external contributors create PRs from forks:
Changes
claude-code-review.yml
Added condition to skip entirely for fork PRs:
claude.yml
Added fork checks for PR-related events:
pull_request_review_comment: Skip if from forkpull_request_review: Skip if from forkissue_comment: Allow (will fail gracefully if on fork PR, but we can't detect that easily)issues: Allow (not fork-specific)Behavior
Before:
After:
Testing
This will be automatically tested when:
Notes
issue_commentevents on fork PRs will still trigger but fail gracefully (acceptable trade-off, as we can't easily detect fork status for issue comments)🤖 Generated with Claude Code