fix(release): include all file changes in version bump detection#3892
fix(release): include all file changes in version bump detection#3892JosephDoUrden wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
Remove the .py/.ts suffix filter from has_changes() so that lockfile changes (uv.lock, package-lock.json) and other non-source file changes trigger a version bump. Any change within a package directory should result in a version update to keep pyproject.toml/package.json versions in sync with the CalVer release tag. Fixes modelcontextprotocol#3870
|
@claude review |
|
Claude finished @cliffhall's task in 1m 0s —— View job PR Review
Summary: The fix is correct and well-scoped. A few observations below. What changed
# Before
changed_files = [Path(f) for f in output.stdout.splitlines()]
relevant_files = [f for f in changed_files if f.suffix in [".py", ".ts"]]
return len(relevant_files) >= 1
# After
changed_files = output.stdout.splitlines()
return len(changed_files) >= 1AssessmentThe fix is correct. The original suffix filter ( The code simplification is clean. Dropping the Edge cases look fine:
Minor considerations1. Over-triggering on doc/config changes With the filter removed, a README, 2. Cosmetic nit
VerdictThe change is a straightforward, correct fix with no regressions. The behavior change (all files trigger version bumps, not just |
Summary
.py/.tssuffix filter fromhas_changes()inscripts/release.pyso that all file changes within a package directory trigger a version bumpuv.lockfrom Dependabot) were silently skipped, leaving stale versions inpyproject.tomlFixes #3870
Problem
has_changes()filtered changed files to only.pyand.tssuffixes:This caused packages with only lockfile changes between tags to retain stale versions. Downstream consumers (SBOM generators, CVE scanners) rely on the version in
pyproject.tomlto match the CalVer release tag.Change
Any change within a package directory now counts as a relevant change, removing the suffix filter entirely.
AI Disclosure
AI assistance (Claude) was used for issue research. The implementation was written and reviewed by the author.