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

conventionalcommits parser should populate the notes prop for commit with '!' #543

Closed
pvdlg opened this issue Nov 4, 2019 · 0 comments · Fixed by #544
Closed

conventionalcommits parser should populate the notes prop for commit with '!' #543

pvdlg opened this issue Nov 4, 2019 · 0 comments · Fixed by #544

Comments

@pvdlg
Copy link
Contributor

pvdlg commented Nov 4, 2019

The conventionalcommits preset introduced an additional way to signal breaking with a ! after the type/scope.
For every other presets (and conventionalcommits when using the BREAKING CHANGE footer) the parsed object will have some values in commits.notes and that can be used to determine if the commit is a breaking change or not.

I see the case of a ! after type/scope is handled in the write:

I think the addBangNotes should also be called in the parser.

The commit feat!: Some breaking feature currently parses to:

{
  message: 'feat!: Some breaking feature',
  type: 'feat',
  subject: 'Some breaking feature',
  header: 'feat!: Some breaking feature',
  notes: [],
}

but it should be instead parsed as:

{
  message: 'feat!: Some breaking feature',
  type: 'feat',
  subject: 'Some breaking feature',
  header: 'feat!: Some breaking feature',
  notes: [{title: 'BREAKING CHANGE', text: 'Some breaking feature' }],
}

or maybe:

{
  message: 'feat!: Some breaking feature',
  type: 'feat',
  subject: 'Some breaking feature',
  header: 'feat!: Some breaking feature',
  notes: [{text: 'Some breaking feature' }],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant