Skip to content

Commit ac06d89

Browse files
committed
Use refs/pull/N/head to fetch tool files from fork PRs
1 parent a32f559 commit ac06d89

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

.github/workflows/pr-check.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929
- name: Check out PR head for manual runs
3030
if: github.event_name == 'workflow_dispatch'
3131
run: |
32-
PR_REF=$(gh pr view ${{ inputs.pr_number }} --repo ${{ github.repository }} --json headRefName --jq '.headRefName')
33-
git fetch origin "$PR_REF"
32+
git fetch origin "refs/pull/${{ inputs.pr_number }}/head"
3433
git checkout FETCH_HEAD -- ${{ inputs.tool_files }}
3534
env:
3635
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)