ci: fix checkout for PRs from forks

Use head repo and SHA when checking out pull_request events so the
workflow can fetch the branch from the fork instead of the base repo.
Fixes CI failure when patch-1 (or other fork branches) don't exist
in the base repository.

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
This commit is contained in:
Cursor Agent 2026-02-16 02:51:34 +00:00
parent 30ea67bcd4
commit eec5771ea1

View file

@ -14,7 +14,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
fetch-depth: 1
- name: "Fail on type: ignore (no suppressions allowed)"