From 8f16420ef8cb050bad31dffec6d470ff5dff0bbf Mon Sep 17 00:00:00 2001 From: SMTP Relay & Email - Free Send <60409540+msgwing@users.noreply.github.com> Date: Sun, 20 Sep 2026 14:20:29 +0200 Subject: [PATCH] fix(ci): board-review and changes need full history, not fetch-depth 2 PR #436 sat BLOCKED for 10 days (2026-09-10 -> 2026-09-20): board-review crashed with 'git diff base head' exit 128 once the branch picked up a third commit past its base sha, because fetch-depth 2 only reaches one commit back from the merge commit. changes has the identical base/head diff and the same latent bug, just not yet hit. Both now fetch full history. --- .github/workflows/lint.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d33302f..a184ed9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -42,9 +42,14 @@ jobs: outputs: code: ${{ steps.check.outputs.code }} steps: + # Full history, not fetch-depth 2. `base.sha` is the tip of `main` at + # PR-open time, not the immediate parent - once a branch picks up a + # third commit (a fixup push, a retrigger), depth 2 no longer reaches + # it and `git diff base head` fails with "bad revision" (exit 128). + # Found 2026-09-20 when PR #436 hit exactly that on its third push. - uses: actions/checkout@v7 with: - fetch-depth: 2 + fetch-depth: 0 - id: check run: | if [ "${{ github.event_name }}" = "pull_request" ]; then @@ -71,16 +76,16 @@ jobs: # Replayed against those six: it catches five, each by a different class, # and lets #396 through, which is the one that was purely reversible. # - # Same SHA pair the `changes` job uses, for the same reason: for a - # pull_request event github.sha is the merge commit, so fetch-depth 2 has - # both sides. + # Same SHA pair the `changes` job uses, and the same fetch-depth fix + # (2026-09-20): a branch three or more commits ahead of its base sha makes + # depth 2 miss the base entirely and `git diff` fails with exit 128. board-review: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: - fetch-depth: 2 + fetch-depth: 0 - uses: actions/setup-python@v7 with: python-version: '3.13'