release-notes-generator
Customizable release-notes-generator plugin for semantic-release based on conventional-changelog
![Greenkeeper badge](https://badges.greenkeeper.io/semantic-release/release-notes-generator.svg)
![npm next version](https://img.shields.io/npm/v/@semantic-release/release-notes-generator/next.svg)
Options
By default release-notes-generator
uses the angular
format described in Angular convention.
Additional options can be set within the plugin definition in package.json
to use a different commit format and to customize it:
{
"release": {
"generateNotes": {
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"writerOpts": {
"commitsSort": ["subject", "scope"],
}
}
}
}
Note: config
will be overwritten by the values of preset
. You should use either preset
or config
, but not both.
Note: Individual properties of parserOpts
and writerOpts
will override ones loaded with an explicitly set preset
or config
. If preset
or config
are not set, only the properties set in parserOpts
and writerOpts
will be used.
Parser Options
Allow to overwrite specific conventional-commits-parser options. This is convenient to use a conventional-changelog preset with some customizations without having to create a new module.
The following example uses Angular convention but will consider a commit to be a breaking change if it's body contains BREAKING CHANGE
, BREAKING CHANGES
or BREAKING
. By default the preset checks only for BREAKING CHANGE
and BREAKING CHANGES
.
{
"release": {
"generateNotes": {
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"],
}
}
}
}
Writer Options
Allow to overwrite specific conventional-commits-writer options. This is convenient to use a conventional-changelog preset with some customizations without having to create a new module.
The following example uses Angular convention but will sort the commits in the changelog by subject
then scope
. By default the preset sort the commits in the changelog by scope
then subject
.
{
"release": {
"generateNotes": {
"preset": "angular",
"writerOpts": {
"commitsSort": ["subject", "scope"],
}
}
}
}
Usage
The plugin is used by default by semantic-release so installing it is not necessary and all configuration are optionals.