mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
fix(ci): fetch full base history in pr-test-policy (shallow graft broke merge-base) (#7501)
With --depth=1 the base ref is grafted, so 'git diff base...HEAD' resolves a wrong merge-base for PR branches that recently merged the release branch. The three-dot diff then attributes ALREADY-MERGED sibling PRs' changes to the PR under test, producing false high-signal reds (deleted test files / weakened asserts that exist in no ref reachable from the PR). Observed live on #7329: the job blamed it for tests/unit/ui/provider-plan-config.test.tsx (deleted by an unrelated merged PR) and for #7106's antigravity files. Local reproduction with full history returns PASS for the same head. The job's checkout is already fetch-depth: 0, so the full base fetch only updates the ref — negligible cost.
This commit is contained in:
committed by
GitHub
parent
88507a6edc
commit
e0894cc107
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -519,7 +519,7 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
- name: Fetch base branch
|
||||
run: git fetch --no-tags origin "${GITHUB_BASE_REF}" --depth=1
|
||||
run: git fetch --no-tags origin "${GITHUB_BASE_REF}"
|
||||
- name: Validate source changes include tests
|
||||
run: node scripts/check/check-pr-test-policy.mjs --summary-file .artifacts/pr-test-policy.md
|
||||
# Anti test-masking: flag net assert removal / new assert.ok(true) in changed tests.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
- CI: `pr-test-policy` fetches the base branch with full history instead of `--depth=1` — the shallow graft made `merge-base` resolve wrong for PR branches that recently merged the release, so the three-dot diff blamed the PR for OTHER merged PRs' changes (false "deleted test"/"weakened asserts" reds; observed on #7329 being blamed for #7106's files).
|
||||
Reference in New Issue
Block a user