A semantic-release commit analyzer plugin that filters out commits according to your configuration.
npm install filtered-commit-analyzerSee @semantic-release/commit-analyzer for more documentation.
``bash`
$ npm install filtered-commit-analyzer -D
The plugin can be configured in the semantic-release configuration file:
`json`
{
"plugins": [
["filtered-commit-analyzer", {
"preset": "angular",
"releaseRules": [
{"type": "docs", "scope":"README", "release": "patch"},
{"type": "refactor", "release": "patch"},
{"type": "style", "release": "patch"}
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
},
"filterRules": {
"scope": "onlyAllowScopesThisRegExPattern",
"youCanUseAnyValidPropertyParsedFromYourCommitMessage": ".*"
}
}],
"@semantic-release/release-notes-generator"
]
}
##### External package / file
filterRules can also reference a module, either by it's npm name or path:`json`
{
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"filterRules": "./config/filter-rules.js"
}],
"@semantic-release/release-notes-generator"
]
}`js``
// File: config/filter-rules.js
module.exports = {
scope: "packageA|packageB"
};