From 5097ea54698efb100afa43f800be3a7d0b8aab37 Mon Sep 17 00:00:00 2001 From: microwave805 Date: Wed, 25 Nov 2026 00:20:14 +0200 Subject: [PATCH] PR checks: check out scripts/pr_check.py from github.sha Under pull_request_target, GitHub executes .github/workflows/pr-check.yml from the current tip of the base branch (github.sha), while github.event.pull_request.base.sha remains pinned to the PR's older base commit until the PR is updated. Checking out scripts/pr_check.py from base.sha ran an outdated copy of the checker against newer workflow YAML, silently bypassing any pr_check.py rules merged onto main after the PR was opened (and risking CLI flag skew such as --test-only). Use github.sha so the workflow and scripts/pr_check.py always come from the same base-branch commit. Assisted-by: Antigravity (Gemini 4 Neon) --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 55781ea2cc..944738a0db 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v4 if: env.UNRELATED_LABEL != 'true' with: - ref: ${{ github.event.pull_request.base.sha }} + ref: ${{ github.sha }} sparse-checkout: scripts/pr_check.py sparse-checkout-cone-mode: false - name: Check the description and files