Skip to content

fix: recognize decorated commit headers - #39

Merged
rvagg merged 1 commit into
nodejs:mainfrom
trivikr:recognize-decorated-commit-headers
Nov 3, 2026
Merged

rvagg merged 1 commit into
nodejs:mainfrom
trivikr:recognize-decorated-commit-headers

Conversation

@trivikr

@trivikr trivikr commented Nov 2, 2026

Copy link
Copy Markdown
Member

Fixes parsing of commit headers that git prints with a suffix:

  • commit <sha> (HEAD -> main), from --decorate, log.decorate=short, or output to a terminal
  • commit <sha> (from <sha>), from -m

/^commit \w+$/ didn't match these headers. The next commit was merged into the previous one: its author went into authors and its summary into description. If the first header was decorated, the parser threw Unexpected line before first "commit" header.

The header check is now /^commit (\w+)/, and the sha comes from the capture group.

@rvagg
rvagg merged commit 4af8b86 into nodejs:main Nov 3, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 3, 2026
## [3.0.2](v3.0.1...v3.0.2) (2026-11-03)

### Bug Fixes

* recognize decorated commit headers ([#39](#39)) ([4af8b86](4af8b86))
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants