Skip to content

fix(release): parser uses first non-empty line as subject (multi-commit bump)#40

Merged
AndreJorgeLopes merged 1 commit into
mainfrom
fix/parser-subject-extraction
Jun 10, 2026
Merged

fix(release): parser uses first non-empty line as subject (multi-commit bump)#40
AndreJorgeLopes merged 1 commit into
mainfrom
fix/parser-subject-extraction

Conversation

@AndreJorgeLopes

Copy link
Copy Markdown
Owner

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.

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>
@AndreJorgeLopes AndreJorgeLopes merged commit 2ab88e9 into main Jun 10, 2026
@AndreJorgeLopes AndreJorgeLopes deleted the fix/parser-subject-extraction branch June 10, 2026 10:56
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