bahmutov / simple-commit-message

Simple commit message wizard and validator; works with commitizen and pre-git
24 stars 8 forks source link

Very strange case (when bumping major) - problem with the body? #15

Closed tunnckoCore closed 7 years ago

tunnckoCore commented 7 years ago

Can't think for some more meaningful title, sorry.

In last hour and two, i'm updating one of my repos, so i included semantic-release, simple-commit-message and github-post-release.

I pushed a fix type commit with Yes answer of Is this major breaking change? question.

2017-08-06-12 45 09_1280x1024_scrot 2017-08-06-12 45 05_1280x1024_scrot

And from the console

Line 1 will be cropped at 100 characters.
All other lines will be wrapped after 100 characters.

? Select the type of change that you're committing: fix:      A bug fix
? Denote the scope of this change (db, api, cli, etc.):
 refactor
? Write a short, imperative tense description of the change:
 require Node >= 7 (because koa-send@4); simplify
? Provide a longer description of the change:
 rewrite from scratch; fix bugs; update build process, npm scripts & boilerplate stuff
? List issues this commit resolves (fixes #2, closes #14):
 fixes #4, resolves #5
? Is this a major breaking change:
 Yes
? Should this be published under different tag?
  This will let users still install the current latest,
  but eary adapters can `npm install <name>@<tag>`
 latest
formed the following commit message
======================================================================================================================
fix(refactor): BREAKING CHANGE: require Node >= 7 (because koa-send@4); simplify

BREAKING CHANGE
rewrite from scratch; fix bugs; update build process, npm scripts & boilerplate stuff
TAG: latest

fixes #4, resolves #5
----------------------------------------------------------------------------------------------------------------------
? Do you want to commit? Yes

And as you see, semantic release published patch version, instead of major. Initially, it was absolutely shock for me, because in first look everything looks okey. But when you look more carefully you may see that the body's BREAKING CHANGE does not have color (:), which i believe caused semantic release to not understand really that this is major change.

For first time i'm bumping major with this package, instead of commitizen. Probably you too? Because if i remember correctly the important thing is that it must be BREAKING CHANGE: in the body. It's not important for semantic-release and (previously used by me) standard-version -- adding it to the title is just a stylistic thing for the users to see it more easy.

All this caused me a bit headache, because need to back to the prev commit, delete release/tag and unpublish that version from npm.

tunnckoCore commented 7 years ago

Mm nope. Sorry, but it obviously is some problem with semantic-release, probably. https://github.com/tunnckoCore/koa-better-serve/commit/dbf5830737ac5063aea0e26b8d1550815c7dcac6

That's impossible. :scream:

2017-08-06-13 50 42_1280x1024_scrot

tunnckoCore commented 7 years ago

Okey, very sorry. Probably my fault, but it's some absurd, for me, to be possible to release major only with type major (without using simple-commit-message), but it seems that way by just using raw git commit.

2017-08-06-15 02 36_1280x1024_scrot

Finally, released.