How can I generate changelog for specific scope
dwips opened this issue · 2 comments
Hi All,
I have requirement to generate changelog for multiple packages by the scope
example:
packages/ui only generate changelog when there is commit message with scope "ui", fix(ui), feat(ui)
packages/utils only generate changelog when there is commit message with scope "utils", fix(utils), feat(utils)
is there a way to do it?
Thank you
I don't think standard-version supports this without scripting something around it. The discussion here might be helpful to you.
You can achieve this by adding a .versionrc in your specific package and add the "scope" option. Here an example :
{
"types": [
{"type": "feat", "section": "Features", "scope": "ui" },
{"type": "fix", "section": "Bug Fixes", "scope": "ui" },
{"type": "chore", "hidden": true, "scope": "ui" },
{"type": "style", "hidden": true, "scope": "ui" },
{"type": "refactor", "hidden": true, "scope": "ui"},
{"type": "perf", "hidden": true, "scope": "ui"},
{"type": "test", "hidden": true, "scope": "ui"}
]
}
Here the documentation: https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md#types