From dde4e55ca5f0e8901e394eae7ed6deb9337dc9ca Mon Sep 17 00:00:00 2001 From: Lasse Benninga Date: Thu, 27 Aug 2026 07:29:32 +0200 Subject: [PATCH] fix(ci): count PR size with three-dot diff Two-dot base..head includes main-only commits when a branch is behind main, so small PRs could fail the 400-line limit. Use base...head to match GitHub's Files changed scope. Co-authored-by: Cursor --- .github/workflows/pr-checks.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index d1dc344..aa6266c 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -75,7 +75,9 @@ jobs: run: | set -euo pipefail git fetch --no-tags --depth=1 origin "$BASE_SHA" 2>/dev/null || true - changed=$(git diff --numstat "$BASE_SHA" "$HEAD_SHA" -- \ + # Three-dot diff: merge-base..head, same scope as GitHub's "Files changed". + # Two-dot base..head counts main-only commits when the branch is behind. + changed=$(git diff --numstat "$BASE_SHA"..."$HEAD_SHA" -- \ . \ ':(exclude)**/uv.lock' \ ':(exclude)**/package-lock.json' \