From 2fca9f91cfde64281b9ae9f0b77eb4c72c728393 Mon Sep 17 00:00:00 2001 From: Tushar Pagar <240662211+tushardev-365@users.noreply.github.com> Date: Thu, 20 Aug 2026 05:47:39 +0000 Subject: [PATCH] fix(ci): check out the PR head SHA so version check works for fork PRs check-version.yml checks out ref: github.head_ref, which is the bare branch name. That only resolves when the branch lives in this repository, so every pull request from a fork fails before the version comparison runs: ##[error]A branch or tag with the name 'fix/webhook-url-validation-error-message' could not be found github.event.pull_request.head.sha resolves for forks too, because GitHub makes the PR head commit fetchable from the base repository, and it pins the exact commit the PR proposes rather than whatever the branch has moved to. Deliberately staying on pull_request rather than pull_request_target: the job executes node against the PR's package.json, so it should keep the read-only token that comes with pull_request. --- .github/workflows/check-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml index e32581f2e2d..fbaae5f202d 100644 --- a/.github/workflows/check-version.yml +++ b/.github/workflows/check-version.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 with: - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Setup Node.js