vercel / release

Generate changelogs with a single command
https://npmjs.com/release
MIT License
3.56k stars 113 forks source link

Support for feature branches #29

Open aesopwolf opened 7 years ago

aesopwolf commented 7 years ago

My team uses feature branches, and we also use the "Squash and merge" feature within GitHub. This makes our master branch look like this (by default):

image

So, do you think it would be possible for release to detect commit messages in that format (instead of using parenthesis such as Error logging works now (patch))? The Angular guidelines could be used:

listed under ### Minor Changes:

listed under ### Patches:

So anything that begins with those words would automatically be sorted to minor or patch.

Tapppi commented 7 years ago

Hi dropping in from the @conventional-changelog team. We have many tools for parsing git commits, doing releases etc. with different formats. I personally am most familiar with the angular convention, but I'm pretty sure you can find useful stuff from us. E.g. Our core changelog generator that is used by both semantic-release and standard-version. Just gimme a holla if you want to know more.

aesopwolf commented 7 years ago

@Tapppi what do you guys use to detect breaking features? Or when you need to bump to the next MAJOR version number?

The most basic/naive solutions I can think of:

  1. Include "(major)" in the commit message. This is what release is currently doing
  2. Have the interactive CLI ask "Are there breaking changes in this release?"

I'm just wondering if there isn't a better/more-automated way though.

Tapppi commented 7 years ago

@aesopwolf The angular convention dictates that breaking change commits should have a footer of BREAKING CHANGE: and the rest of the commit message is reserved for that change.

See the standard-version changelog for an example. So for example, the 4.0.0 has a bug fix

include merge commits in the changelog

and if you go to the commit linked to that change you'll find the BREAKING CHANGE that is included as the 4.0.0 breaking change

merge commits are now included in the CHANGELOG.

Docs on it can be found in the conventional-changelog-standard commit guidelines or in the more detailed angular docs linked there.

tleunen commented 7 years ago

Indeed, it would be great if we could setup release to use the conventional-changelog format.