Skip to content

ci: exclude deleted files from changelog-location check#2

Merged
ijbo merged 1 commit into
mainfrom
claude/zealous-goldberg-f31c40
May 14, 2026
Merged

ci: exclude deleted files from changelog-location check#2
ijbo merged 1 commit into
mainfrom
claude/zealous-goldberg-f31c40

Conversation

@ijbo
Copy link
Copy Markdown
Contributor

@ijbo ijbo commented May 14, 2026

Summary

The check-changelog job in .github/workflows/deploy.yml was failing on every commit that removed a root-level CHANGELOG-*.md file — including legitimate cleanup commits that moved stray root changelogs into changelogs/ (the very fix the rule is meant to encourage).

Root cause: git diff --name-only returns a path regardless of whether the file was added, modified, or deleted. The regex ^CHANGELOG-.*\.md$ matched deleted root-level changelogs and the job exited 1.

This was hit on PR #1 (which merged anyway) and is currently breaking CI on main for the merge commit.

Fix

Pass --diff-filter=ACMR to both git diff --name-only invocations so the file list only includes Added / Copied / Modified / Renamed entries. Pure deletions are excluded.

Newly-added root-level CHANGELOG-*.md files are still caught — that's still in the ACMR set.

Test plan

  • Watch this PR's own Deploy to GitHub Pages workflow → check-changelog should pass (only .github/workflows/deploy.yml and changelogs/CHANGELOG-ci-changelog-check.md change; no root-level changelog deletions remain in the ACMR-filtered diff)
  • After merge, the next regular commit on main that touches code should pass check-changelog

🤖 Generated with Claude Code

The check-changelog job in deploy.yml flagged any path matching
^CHANGELOG-.*\.md$ in the diff — including pure deletions. Commits
that moved a root-level changelog into changelogs/ or removed
duplicates still failed the gate, since the old root path appeared
in git diff --name-only as a deletion entry.

Fix: pass --diff-filter=ACMR so the file list only contains files
that were Added, Copied, Modified, or Renamed — deletions are
ignored. Newly-added root-level CHANGELOG-*.md files are still
caught.
@ijbo ijbo merged commit bc9c0d2 into main May 14, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant