btford/grunt-conventional-changelog — pull request #13 by vojtajina (2013-07-06 19:40:53+00:00)
Title: Merge this plugin with Karma & Angular changelog task

There are many versions of this script. The one I originally wrote for AngularJS, the one in Karma, this grunt plugin and I'm pretty sure there are some more... **I'd like to merge them and make Karma (and all its plugins) and Angular to use this grunt plugin.**

I thought, I would just add features to this task, however the code was really hard for me to grasp, so this PR is basically replacing it with the one from Karma (along with some adaptations to this plugin and other changes from Angular).

The main thing I care about is the output, here's an example:
https://github.com/karma-runner/karma/blob/master/CHANGELOG.md

Also, here's this plugin changelog, re-generated, to see the difference:

- [original](https://github.com/btford/grunt-conventional-changelog/blob/master/CHANGELOG.md)
- [new](https://github.com/vojtajina/grunt-conventional-changelog/blob/cea8a22c18ade8d89f4df70b7c9d8da4e4240a10/CHANGELOG.md)

**Couple of differences in the output:**

- bigger header for major releases
- if a scope has only one change, it's on a single line, otherwise nested lists
- no scoped changes
- links to closed/fixed issues
- anchor/link to each release

Codewise:

- there are tests and travis build
- the code itself is grunt agnostic

Changes:

- **the template is not configurable** - I think having configurable template (as the plugin has now) is better, however during the refactoring I realized that it made it very hard to achieve the formatting I wanted (eg. different header for minor/patch release). Also, the template currently used is pretty much imperative JS anyway, so I went back to the original imperative style. I think we can allow people to configure individual template fragments, rather than the whole template (eg. minorHeaderTpl, patchHeaerTpl, changeItemTpl, etc...)

- **by default the output is written to `CHANGELOG.md`** - I think this is the 99% use case and therefore reasonable default; also this version does output some logging, which would clobber the actual output (however, the code is agnostic of writing into file, it is only done in the grunt wrapper task, so we can easily change this back)

- **adding `editor` option** - you can set this to say `sublime -w` and during the release process, you can amend the auto generated changelog before commiting

- **removing `enforce` option** - the git commit hook should not be installed during generating the changelog, we can add another task for it

The Travis build is passing: https://travis-ci.org/vojtajina/grunt-conventional-changelog/builds/8802716

What do you think @btford ?