fix(release): parser uses first non-empty line as subject (multi-commit bump)#40
Merged
Merged
Conversation
git log --format=%B%x00 separates records with a newline, so every commit after the newest carried a leading blank line and head -1 returned an empty subject — misclassifying it as "other". A range with a feat behind the newest commit then bumped as patch instead of minor (v0.2.2 should have been minor). Fix: take the first non-empty line via awk. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Second parser bug surfaced while shipping #38/#39.
Bug: git log --format=%B%x00 separates records with a newline, so every commit after the newest carried a leading blank line; head -1 returned an empty subject and classified it as other. A range containing a feat behind the newest commit bumped PATCH not MINOR — v0.2.2 should have been v0.3.0.
Fix: first non-empty line via awk NF{print;exit}. Verified on the real v0.2.1..HEAD range: all three subjects now extract correctly.
Follow-up worth doing: a release.bats case for multi-commit classification.
Merges to v0.2.3.