Generate a simple changelog for your release based on git commit history.
$ npm install -g changelist
$ changelist --help
Usage
$ changelist
Options
-b, --base Specify the path of the git repo. By default, all file paths
are relative to process.cwd()
-p, --preset The preset to use for changelist export.
You can choose `slack` and `markdown` presets.
If no preset is specified, then a simple markdown changelist will be generated.
-c, --commitish The commit-ish from which you want to generate the changelist.
Default to [latest-tag]..HEAD.'
-r, --release The version of the upcoming release. If not specified, the cli
will read the version from `package.json`.
-i, --ignore A list of commit messages you want to mask in the changelist.
-o, --output Define a file to write the changelist output to (will be prepended to the file)
default to CHANGELOG.md
-N, --name Generate a random name for the release
-V, --verbose Output more detailed information
-h, --help Display this notice
Examples
$ changelist
$ changelist --base /home/github/changelist
$ changelist -c 1.0.0..HEAD -r 1.0.1
- Auto categorisation
- Custom presets
- Ignore commit with specific message
- Prepend output to file
- Generate release name
If you format your commit(s) using the following syntax [category]: [commit message]
this will automatically group the commits under the specified category.
For example if we take the following commits:
- documentation: add options documentation
- documentation: update options examples
This will get exported like so:
- Add options documentation
- Update options examples
If you don't want to export the changelist using markdown format you can change the preset used by using the preset
command like so:
changelist -p slack
This will use a preset for Slack-compliant changelist export. Available presets:
markdown
: default markdown exportslack
: a slack friendly changelist export (using slack message formatting)
We are humans and sometimes we can do stuff we are not proud of. If you want/need to mask commit containing a certain message from your export, you can use the ignore
option like so:
$ changelist -i 'jobs... steve jobs'
NOTE: if you need to hide several commits in the changelist (yeah sometime shit happens) it's also possible using comma separated values:
$ changelist -i 'jobs... steve jobs','gave up and used table','all sorts of things'
$ changelist -o TEST.md
Will prepend the output of the command to a TEST.md
file (and create the file if missing).
NOTE the ouput folder will follow the exact path you entered meaning that you could do something like:
$ changelist -o ./foo/bar/TEST.md
This will create the folders recursively if missing or simply use the existing file otherwise.
If you want your release to have a fancy name on top of a number simply pass the -N
flag like so:
$ changelist -N
This will give you cool names like Repulsive Chirogymnast
, Kernelless Reestimation
or Overtrustful Japygid
.
Why? Because it's fun. And it's important to have fun.
If you need to prepend the result of the changelist command in a file, you can simply do:
$ echo -e "$(changelist)\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
- Add
Jira
integration (update flagged ticket). - Add tests
- Add documentation
- Add cli options for auto generate a release name (available under a
-N
flag) - Add an ignore option to mask a list of commit containing specific message.
- Add option to write output directly to the
CHANGELOG.md
file (from Node.js)