mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 00:34:09 +00:00
[fix] Correct checkout ref for fork PRs in lint-and-format workflow
The workflow was using `github.event.pull_request.head.ref` which only
contains the branch name (e.g., 'mpe/typoFixes'). For PRs from forks,
this causes GitHub Actions to incorrectly look for that branch in the
main repository instead of the fork.
Changed to use `refs/pull/${{ github.event.pull_request.number }}/head`
which correctly references the PR's merge ref that GitHub creates. This
ensures the workflow checks out the right code for both fork and non-fork PRs.
This issue was observed in PR #5880 where the workflow was fetching from
Comfy-Org/ComfyUI_frontend instead of the contributor's fork.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2
.github/workflows/lint-and-format.yaml
vendored
2
.github/workflows/lint-and-format.yaml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/head
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install pnpm
|
||||
|
||||
Reference in New Issue
Block a user