Skip to content

Parse breaking change footer - #158

Merged
thekaveman merged 6 commits into
compilerla:mainfrom
mate-amargo:parse_breaking_change
Oct 29, 2026
Merged

thekaveman merged 6 commits into
compilerla:mainfrom
mate-amargo:parse_breaking_change

Conversation

@mate-amargo

Copy link
Copy Markdown
Contributor

This PR resolves #106

It adds a check for the body to look for BREAKING CHANGE: and its proper formatting.
I've followed the specifications from https://www.conventionalcommits.org/en/v1.0.0/

Notice that the convention states that if ! is specified in the delimiter, then the BREAKING CHANGE might be omitted. So you could argue that a bad formatted BREAKING CHANGE could be acceptable since it would be ignored when using !.

I chose to enforce it anyways regardless of !. That is, if there's a footer that says "breaking change:" and it's not all caps, the commit is rejected. (As per the convention, it can be BREAKING CHANGE: or BREAKING-CHANGE: with the dash.)

I also added unit tests for the new cases.

@mate-amargo
mate-amargo force-pushed the parse_breaking_change branch from 17d7206 to 37d10c1 Compare October 25, 2026 14:50

@thekaveman thekaveman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to enforce it anyways regardless of !.

I agree with this!

Thanks for your work on this @mate-amargo

@thekaveman
thekaveman merged commit 491a0bc into compilerla:main Oct 29, 2026
6 checks passed
@thekaveman

Copy link
Copy Markdown
Member

Thanks again @mate-amargo, this is now released on PyPI as v4.5.0

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.

Hook should check for misspellings of 'BREAKING CHANGE:'

2 participants