fix: scope email check to branch-new commits, not full repo history

git log --full-history in CI sees the merge commit's both parents —
the main-branch parent carries old personal-email commits from before
the noreply migration, causing a false positive.

Fix: detect merge commit (HEAD^2 = PR tip, HEAD^1 = main tip) and use
HEAD^1..HEAD^2 range; fall back to merge-base..HEAD locally.
Also set fetch-depth: 0 in CI so merge-base is available.
This commit is contained in:
Зарубин Филипп
2026-06-23 22:02:49 +03:00
parent cc947028c5
commit 0000b684ca
2 changed files with 13 additions and 2 deletions
+2
View File
@@ -12,6 +12,8 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # нужен для merge-base в email-check
- name: shellcheck (lint)
run: |