-
Notifications
You must be signed in to change notification settings - Fork 536
Closed
Description
Inertia adapter(s) affected
- React
- Vue 3
- Svelte
- Not Applicable
JS package version
NA
Backend stack (optional)
NA
Describe the problem
What happened
The workflow failed during actions/checkout@v4:
git fetch ... origin +refs/heads/add-page-context-to-resolve-component-function* ...
The process '/usr/bin/git' failed with exit code 1
Why
For forked PRs, the branch exists only in the fork, not in inertiajs/inertia.
We were trying to fetch it from the base repo → checkout failed.
Fix
Checkout the PR head repo + commit instead of the base:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}(Universal version for both pushes and PRs:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }})
Note
Although this fix unblocks checkout, git-auto-commit-action@v5 may still fail later: the GITHUB_TOKEN is read-only for forks. If we want auto-push on fork PRs, we’ll need to explore a PAT/GitHub App approach.
I'd be happy to open a PR if we agree on the approach.
Steps to reproduce
check #2485
Metadata
Metadata
Assignees
Labels
No labels