1 回答
TA贡献1840条经验 获得超5个赞
默认情况下,更改日志文本由常规更改日志角度生成,并且在那里确定要包含在更改日志中的提交类型。
见https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/writer-opts.js#L45
如果您想在更改日志中包含其他类型的提交,您可以创建自己的预设(基于conventional-changelog-angular),该预设将包括所有提交类型。
或者,您可以使用常规更改日志常规提交预设,该预设支持types定义新类型的选项以及是否应将它们包含在发行说明中。
您的语义发布配置将是:
{
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "conventionalcommits",
"releaseRules": [
{"type": "improvement", "release": "minor"}
]
}],
["@semantic-release/release-notes-generator", {
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "perf", "section": "Performance Improvements"},
{"type": "revert", "section": "Reverts"},
{"type": "docs", "section": "Documentation", "hidden": true},
{"type": "style", "section": "Styles", "hidden": true},
{"type": "chore", "section": "Miscellaneous Chores", "hidden": true},
{"type": "refactor", "section": "Code Refactoring", "hidden": true},
{"type": "test", "section": "Tests", "hidden": true},
{"type": "build", "section": "Build System", "hidden": true},
{"type": "ci", "section": "Continuous Integration", "hidden": true},
{"type": "improvement", "section": "Improvement", "hidden": false}
]
}
}]
]
}
我添加了releaseRules配置,@semantic-release/commit-analyzer因为我假设您想为improvement提交创建一个次要版本。
添加回答
举报