koji
koji copied to clipboard
BREAKING CHANGE footer
The breaking change prompt currently adds the !
symbol to the first line of the commit as expected.
A BREAKING CHANGE footer is optional within the spec, and I wonder if this could also be included within the prompt. Though this might require a different behaviour from the relevant prompt,
This should be handled similarly to the scope and description prompt in my opinion. I'd like a conditional prompt appearing after confirming that there are breaking changes that asks me for a description of the breaking change, but allows me to just hit enter to skip adding the footer altogether.
By the way, I recommend using BREAKING-CHANGE
(see the -
instead of a white-space, they're synonymous according to the spec) to comply with git-interpret-trailers, as Git explicitly states that "there can be no whitespace before or inside the <key>".
It's also worth noting that how you currently handle the issue reference, it does not comply with git trailers either. Adding the here-proposed footer would break either its key or its value, depending on if the reference was on the line in front of or after the breaking change footer. In my understanding, there's two ways to mitigate this: Either keep the reference in the body part of the commit (like on the line after the description), or put the reference into a separate footer (such as Refs
, see the following example in the Conventional Commits specification: https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-multi-paragraph-body-and-multiple-footers).