设置 @semantic-release 以考虑 CHANGELOG 中的 'refactor' 提交
Setup @semantic-release for considering 'refactor' commits in the CHANGELOG
使用 @semantic-release
我想考虑对两者进行 重构 更改,触发新版本并在 CHANGELOG.md 文件中记录下来。
到目前为止,我已经在 "@semantic-release/commit-analyzer"
包含了 refactor 提交,因此它们触发了补丁发布:
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "refactor",
"release": "patch"
}
]
}
],
但是那些提交消息没有包含在 CHANGELOG 文件中,我如何设置 "@semantic-release/release-notes-generator"
插件来包含重构提交?我发现相关 doc 令人困惑且缺乏示例
- 生成的 CHANGELOG 示例
## [0.6.4](.../compare/v0.6.3...v0.6.4) (date)
## [0.6.3](.../compare/v0.6.2...v0.6.3) (date)
- 所需的变更日志
## [0.6.4](.../compare/v0.6.3...v0.6.4) (date)
[[>>INCLUDE HERE COMMIT MSG + LINK<<]]
## [0.6.3](.../compare/v0.6.2...v0.6.3) (date)
如果有人觉得这有用:我们需要配置 "@semantic-release/release-notes-generator"
以考虑除 feat 和 fix 之外的其他关键字,包括这些口述:
{
"type": "refactor",
"section": "title to be used in changelog.md",
"hidden": false
}
对于复制粘贴,此设置正在收集 refactor、chore 和 perf进入 ## Internal
部分(注意我需要写明确的默认值,我想这是因为它覆盖了配置)
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalCommits",
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES",
"BREAKING"
]
},
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Internal",
"hidden": false
},
{
"type": "refactor",
"section": "Internal",
"hidden": false
},
{
"type": "perf",
"section": "Internal",
"hidden": false
}
]
}
}
]
使用 @semantic-release
我想考虑对两者进行 重构 更改,触发新版本并在 CHANGELOG.md 文件中记录下来。
到目前为止,我已经在 "@semantic-release/commit-analyzer"
包含了 refactor 提交,因此它们触发了补丁发布:
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "refactor",
"release": "patch"
}
]
}
],
但是那些提交消息没有包含在 CHANGELOG 文件中,我如何设置 "@semantic-release/release-notes-generator"
插件来包含重构提交?我发现相关 doc 令人困惑且缺乏示例
- 生成的 CHANGELOG 示例
## [0.6.4](.../compare/v0.6.3...v0.6.4) (date)
## [0.6.3](.../compare/v0.6.2...v0.6.3) (date)
- 所需的变更日志
## [0.6.4](.../compare/v0.6.3...v0.6.4) (date)
[[>>INCLUDE HERE COMMIT MSG + LINK<<]]
## [0.6.3](.../compare/v0.6.2...v0.6.3) (date)
如果有人觉得这有用:我们需要配置 "@semantic-release/release-notes-generator"
以考虑除 feat 和 fix 之外的其他关键字,包括这些口述:
{
"type": "refactor",
"section": "title to be used in changelog.md",
"hidden": false
}
对于复制粘贴,此设置正在收集 refactor、chore 和 perf进入 ## Internal
部分(注意我需要写明确的默认值,我想这是因为它覆盖了配置)
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalCommits",
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES",
"BREAKING"
]
},
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Internal",
"hidden": false
},
{
"type": "refactor",
"section": "Internal",
"hidden": false
},
{
"type": "perf",
"section": "Internal",
"hidden": false
}
]
}
}
]