fix: allow release changes in files a bump glob owns - #4
Merged
Conversation
release-check assumed every [[tool.bumpversion.files]] entry carried a filename, so a repository that points bump-my-version at a glob (compas_eve does, for its Grasshopper component headers) crashed with KeyError: 'filename' before the release could be validated at all. Entries are now read as either a filename or a glob, and the changed-file check matches paths against the globs with PurePath.full_match, which handles the recursive ** the same way bump-my-version does. That needs Python 3.13, so the action asks setup-python for it. An entry with neither key is reported as a configuration error rather than a traceback. The test fixture now carries a glob entry, as a real configuration does, so the existing cases cover the crash too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gonzalocasas
force-pushed
the
fix/release-check-glob-files
branch
from
August 28, 2026 09:01
89517db to
cd3db8b
Compare
Member
Author
|
@chenkasirer @Licini ping ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
release-checkassumed every[[tool.bumpversion.files]]entry carried afilename, so a repository that points bump-my-version at aglobcrashed withKeyError: 'filename'before any release metadata was validated. compas_eve hit this on its v2.4.0 release PR (compas-dev/compas_eve#32), which uses a glob for the Grasshopper component headers:What changed
configured_filesreturns literal names and globs instead of names alone. The changed-file check matches paths against the globs withPurePath.full_match, which handles the recursive**the same way bump-my-version does.full_matchis Python 3.13, so the action asks setup-python for 3.13 rather than 3.12. The validate workflow already runs 3.13.filenameor byglob", since "files listed by the version configuration" was the wording that implied literal names only.Verification
python -m unittest discover -s testspasses (3 tests). Withcheck_release.pyreverted to main's version, all 3 fail — so the suite genuinely covers the bug.is-release=true,version=2.4.0,tag=v2.4.0.No overlap with #3, which touched only
README.mdandgithub-release/action.yml.🤖 Generated with Claude Code