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

fix: prefer description over BREAKING CHANGE #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ttd2089
Copy link

@ttd2089 ttd2089 commented Aug 7, 2023

The conventional commit specification says the following about breaking changes indicated with ! after the type and BREAKING CHANGE footers:

If included in the type/scope prefix, breaking changes MUST be
indicated by a ! immediately before the :. If ! is used, BREAKING
CHANGE: MAY be omitted from the footer section, and the commit
description SHALL be used to describe the breaking change.

This updates the commit parser to prefer the description from the subject line over the value of the BREAKING CHANGE footer when both describe breaking changes. This is more inline with the specification and also allows consumers to enumerate all breaking change descriptions in the case where the subject and footers are used to list more than one breaking change.

The conventional commit specification says the following about breaking
changes indicated with ! after the type and BREAKING CHANGE footers:

> If included in the type/scope prefix, breaking changes MUST be
  indicated by a ! immediately before the :. If ! is used, BREAKING
  CHANGE: MAY be omitted from the footer section, and the commit
  description SHALL be used to describe the breaking change.

This updates the commit parser to prefer the description from the
subject line over the value of the BREAKING CHANGE footer when both
describe breaking changes. This is more inline with the specification
and also allows consumers to enumerate all breaking change descriptions
in the case where the subject and footers are used to list more than one
breaking change.
@ttd2089
Copy link
Author

ttd2089 commented Aug 7, 2023

Thanks @Insomniak47 but I shared this PR because I thought you'd be interested not because I needed a +1 from you 😂.

Friends don't let friends review un-caffeinated.

@epage
Copy link
Contributor

epage commented Aug 7, 2023

I've created conventional-commits/conventionalcommits.org#535 to get clarification on this because, while I can understand this interpretation of the spec, it seems wrong to me.

@ttd2089
Copy link
Author

ttd2089 commented Aug 7, 2023

I've created conventional-commits/conventionalcommits.org#535 to get clarification on this because, while I can understand this interpretation of the spec, it seems wrong to me.

Thanks for the reply. I'll reply on the issue you created there since we're talking about the spec rather than the implementation.

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.

None yet

4 participants