Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE footer #86

Open
timhatch opened this issue Jan 29, 2024 · 1 comment
Open

BREAKING CHANGE footer #86

timhatch opened this issue Jan 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@timhatch
Copy link

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,

@timhatch timhatch added the enhancement New feature or request label Jan 29, 2024
@cococonscious
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants