commit-analyzer: "BREAKING CHANGE:" and "!" after type not properly triggering major release
I’ve seen the other issues like this that are already closed (#108)! But I believe this is different. BREAKING CHANGE: appears at the beginning of the footer, yet the release is only minor.
Here’s the output from https://github.com/dgattey/dg/runs/2444677702?check_suite_focus=true
[4:18:45 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: swapping to a hopefully-better codegen
[4:18:45 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[4:18:45 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: pull data from Contentful dynamically to populate the pages
Just the id for now, but coming soon, all the data!
BREAKING CHANGE: fully overhauls the content creation & usage - all data now controlled
directly by Contentful. There should be no strings outside basic site metadata checked into
the repo from now on!
[4:18:45 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[4:18:45 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: includes graphql types codegen automatically
[4:18:45 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 17
Commits related to this issue
- feat: force trigger release https://github.com/semantic-release/commit-analyzer/issues/231 BREAKING CHANGE: show commit 8a4ec01769e144010253361e267e41cb21c5bc19 (https://github.com/LumaKernel/vim-ts... — committed to LumaKernel/vim-tsdetect by LumaKernel 4 years ago
- ci: fix release pipeline for breaking changes https://github.com/semantic-release/commit-analyzer/issues/231 — committed to williscool/CalendarNotification by williscool 2 years ago
- ci: fix release pipeline for breaking changes (#83) https://github.com/semantic-release/commit-analyzer/issues/231 — committed to williscool/CalendarNotification by williscool 2 years ago
Adding my +1 here. According to the Conventional Commits spec, adding only the exclamation mark after the
typeshould trigger amajorincrement. Instead, I’m gettingThere are no relevant changes, so no new version is released.From Conventional Commits 1.0.0:
I did a deep dive on this and think the way it is, is counterintuitive when expecting Conventional Commits 1.0.0 to apply.
However as the default ruleset/parserConfig is using conventional-changelog-angular and the corresponding commit message guidelines of angular do not adhere to the rule declaring breaking changes by exclamation mark like:
feat(abc)!: ..., I think the current behaviour is correct.As @aleclarson noted, if you want to apply the rules of the conventional commits spec, then you can configure that as the preset to use.
If this should be fixed in the angular rules, it needs to be done in the conventional-changelog angular parser options by introducing:
As in the parser options of convetional commits.
Another but different discussion is, if the default ruleset of the commit-analyzer should be switched from angular to conventional-commits, as people (me included) were/are expecting adherence to those specifications.
@alehar9320 that’s not going to work regardless since you need
BREAKING CHANGE:(note the colon) to start the “footer” section of the commit (the last paragraph) as far as I understand. But my problem was that even with the colon, it wasn’t triggering it. Your commit in the log hasBREAKING CHANGE:in the subject, and the example commit doesn’t haveBREAKING CHANGE:starting a new paragraph.Regardless, it’s not well documented, and seems to not be working properly as according to the Angular preset. Little mystified here.
If you try a commit message like this, it should work (assuming
fixis valid to start a commit for your setup). The!in the subject is what did it for me:Here’s a workaround. Put this in the
pluginsarray of your release config:You need to use
release.config.jsinstead of JSON config.Then install
conventional-changelog-conventionalcommits.Setting
conventionalcommitsalso suggested by @texhnolyze seems also more logical to me (thanangularpreset) as defaultAny update on this ?