Skip to content

Commit f774023

Browse files
committed
fix: fetch fork PR heads in benchmark workflow
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
1 parent dbc83df commit f774023

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/benchmark-sqlglot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ jobs:
2424
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
run: |
2626
PR_NUMBER=${{ github.event.issue.number }}
27-
PR_HEAD=$(gh pr view $PR_NUMBER --json headRefName -q .headRefName)
28-
git fetch origin "$PR_HEAD"
29-
git checkout "$PR_HEAD"
27+
PR_HEAD_REPO=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.head.repo.clone_url')
28+
PR_HEAD_REF=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.head.ref')
29+
git fetch "$PR_HEAD_REPO" "$PR_HEAD_REF"
30+
git checkout FETCH_HEAD
3031
3132
- name: Set up Python
3233
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)