CICD/claude-action-review#373
Closed
zander-raycraft wants to merge 15 commits into
Closed
Conversation
calm fix 4 adding skills to repo [ISSUE abhigyanpatwari#140]
…ccabb/claude-code-action
|
@zander-raycraft is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
@claude let's see if this works now |
Contributor
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 2932 tests passed 20 test(s) skipped — expand for detailsIntegration:
Unit:
Code CoverageCombined (Unit + Integration)
Coverage breakdown by test suiteUnit Tests
Integration Tests
📋 View full run · Generated by CI |
Collaborator
It failed https://github.com/abhigyanpatwari/GitNexus/actions/runs/23268133272/job/67654125423 :( |
Collaborator
Author
|
@claude can you look at this |
Collaborator
Author
|
Thanks @magyargergo looking at this now, needed actual PR requests to test |
Collaborator
Author
|
closing for a second while testing |
Collaborator
Author
|
@claude look at this |
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.
Fork PR Claude Workflow Fix
The Issue
When a contributor opens a PR from a fork (e.g.
zander-raycraft/GitNexus->abhigyanpatwari/GitNexus) and someone comments@claudeor a review is triggered, the workflow fails intermittently with HTTP 403 errors.The root cause:
anthropics/claude-code-action@v1internally runsgit fetch origin <branch-name>to check out the PR code. But fork branches don't exist on the base repo's origin, they only exist on the fork. So when the branch name doesn't happen to match an existing branch on origin, the fetch fails.This made it look "unreliable", same-repo PRs always worked, fork PRs only worked when branch names coincidentally matched.
How It Was Found
random-guy/GitNexustoabhigyanpatwari/GitNexuswould sometimes trigger Claude successfully and sometimes 403git fetch origin <branch>call inside the official action, fork branch names don't exist on originHow To Verify
mainonabhigyanpatwari/GitNexus(workflow changes only take effect from the default branch forissue_commentevents)abhigyanpatwari/GitNexus@claudeon the PR, should respond every time, not just sometimesThe Fix: What Repo Was Used
Used
luccabb/claude-code-action, a fork of the officialanthropics/claude-code-actionthat adds fork PR support.The fork detects fork PRs via the GitHub GraphQL field
isCrossRepositoryand fetchespull/{N}/headinstead of the branch name. That ref always exists for any PR regardless of where it came from.Files Modified
.github/workflows/claude.ymluses: anthropics/claude-code-action@v1touses: luccabb/claude-code-action@7f39722b8a782471258f32e1d5a9a531b2b68056pull-requests: readtopull-requests: write(so Claude can post comments)issues: readtoissues: write(same reason).github/workflows/claude-code-review.ymluses: anthropics/claude-code-action@v1touses: luccabb/claude-code-action@7f39722b8a782471258f32e1d5a9a531b2b68056pull_requesttrigger withpull_request_target, this runs in the base repo context so secrets are available for fork PRs. Using onlypull_request_target(not both) avoids double-firing on same-repo PRs.if:condition, only runs forOWNER,MEMBER, orCOLLABORATORauthor associations, blocks untrusted fork authors from running with repo secretspull-requestsandissuespermissions towritegitnexus/test/unit/workflows.test.ts(new file)37 regression tests covering:
@v1or@mainrefs)author_associationgit/refsAPI calls)Official Documentation Backing This Approach
GitHub Docs:
pull_request_targetGitHub Docs: Fork PR permissions
GitHub Docs:
GITHUB_TOKENpermissions for forksGitHub Docs: Pull request refs
Flow Diagram