From 40963322da06f6e73199fbd7574469a67fbdb30a Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 17 Oct 2026 13:42:39 -0400 Subject: [PATCH] fix(ci): diff PRs against the current base branch pull_request.base.sha is the base commit from when an older PR was opened, so validate counted everything merged to main since then (README.md, dist/registry.json, other entries) as part of the PR and failed it. Use origin/, whose merge base with the PR merge commit is the current base tip. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/validate-pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 34cb806..171a08c 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -40,7 +40,9 @@ jobs: - name: Check catalog changes env: GITHUB_TOKEN: ${{ github.token }} - BASE_REF: ${{ github.event.pull_request.base.sha || 'origin/main' }} + # Compare against the current base branch, not pull_request.base.sha: on an older PR that is the base + # commit from when the PR was opened, which would count everything merged since as part of the PR + BASE_REF: origin/${{ github.event.pull_request.base.ref || 'main' }} # Only the README bot's own PRs (opened by github-actions[bot] from this repo's bot/readme-* branches) # may change the generated files ALLOW_GENERATED: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'bot/readme-') }}