From 0cbea1d55a725b70fec8c4f19be13e12ced81b11 Mon Sep 17 00:00:00 2001 From: Steve Mendes Reis <6802086+M4n0x@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:36:11 +0100 Subject: [PATCH] ci: check a pull request against the base it merges into The version check and the one-package check diffed the merge checkout against the event's base.sha, which can be older than the base branch the pull request is merged into. A pull request behind main then counted main's newer commits as its own, as #72 did with openvpn-connect. The merge commit's first parent is the base it merges into. --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50ca1b5..5c87a1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,14 +40,13 @@ jobs: run: ./scripts/test.sh - name: Check versions if: github.event_name == 'pull_request' - env: - BASE: ${{ github.event.pull_request.base.sha }} - run: ./scripts/check-versions.sh "$BASE" + # The checkout is the pull request merged into the base branch, so HEAD^1 is the base it + # merges into. The event's base.sha can be older, which counted the base branch's newer + # commits as part of the pull request. + run: ./scripts/check-versions.sh HEAD^1 - name: Check one package per pull request if: github.event_name == 'pull_request' - env: - BASE: ${{ github.event.pull_request.base.sha }} - run: ./scripts/check-one-package.sh "$BASE" + run: ./scripts/check-one-package.sh HEAD^1 # Checks every package against the newest StableBar and against its latest release, the version # most people install the store's packages into. A package that needs a newer StableBar than the