语义发布 - 向自动生成的发布说明添加更多部分

我刚刚为我的节点项目设置了语义发布,并使用它发布了第一个版本:

http://img3.mukewang.com/61df94220001fde506570469.jpg

似乎只有带有类型的提交fix或被feat添加到发行说明中......我也希望能够显示improvement类型。

有没有办法配置/添加它?谢谢!


慕桂英4014372
浏览 150回答 1
1回答

慕斯709654

默认情况下,更改日志文本由常规更改日志角度生成,并且在那里确定要包含在更改日志中的提交类型。见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提交创建一个次要版本。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript