Skip to content

Commit d5b3a79

Browse files
ci(coverage): drop --depth=1 on the base fetch — fix diff-cover 'no merge base' (#49)
The patch-coverage gate fetched the base with --depth=1, leaving no merge-base with a PR branch behind base → diff-cover crashed with 'no merge base'. Checkout is fetch-depth:0, so a plain fetch resolves it. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1667b82 commit d5b3a79

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/coverage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ jobs:
6161
if: github.event_name == 'pull_request'
6262
working-directory: common
6363
run: |
64-
git fetch origin "${{ github.base_ref }}" --depth=1 || true
64+
# Full base history (NOT --depth=1): a shallow base fetch shares no merge-base
65+
# with a PR branch that is behind base → diff-cover "no merge base" crash.
66+
git fetch origin "${{ github.base_ref }}" || true
6567
diff-cover coverage.xml \
6668
--compare-branch="origin/${{ github.base_ref }}" \
6769
--fail-under=100

0 commit comments

Comments
 (0)