5

When I create a commit like this, git commit -m'BREAKING CHANGE: foo bar' and push up semantic-release tells me,

[@semantic-release/commit-analyzer] › ℹ  Analyzing commit: BREAKING CHANGE: Changes from slice_into_subrepo
[@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: no release

How come BREAKING CHANGE doesn't create a release, it's documented to do that here,

BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reasons.

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468

1 Answers1

10

This is a really poor error. The reason why is reported in GitHub issue #108,

Please see the Angular Commit Message Conventions. BREAKING CHANGE: must be in the footer of the commit. You wrote it in the subject.

This may be confusing because the example on the home page shows,

perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed.
The default graphite width of 10mm is always used for performance reasons.  

This is not two examples, it's one. This is how it looks to have "BREAKING CHANGE:" in the footer.

This is also touched on on the documentation for @semantic-release/commit-analyzer,

Note: Your commits must be formatted exactly as specified by the chosen convention. For example the Angular Commit Message Conventions require the BREAKING CHANGE keyword to be followed by a colon (:) and to be in the footer of the commit message.

For more information see the upsream docs on "Angular Commit Message Format"

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
  • OMG I just ran into this problem. What the heck is a "footer" in commit message? I have no idea a commit message can have subject and footer differences. :( – dhwang Jun 30 '23 at 19:38
  • Also worth mentioning that only the following commit types will make a release: - fix - feat - perf All others WON'T publish a release. You can however tweak the configuration to make it work – Filip Malek Jul 26 '23 at 13:25