I need to include other commits than `feat` and `fix`.
Hi Help wanted π
I have a react app configured with GithubPages. I need to include commits like chore, style, refactor ..etc in the generated CHANGELOG.
This is my config .releaserc.json
{
"branches": [
{ "name": "main" },
{ "name": "pre/rc", "channel": "pre/rc", "prerelease": "rc" },
{ "name": "beta", "channel": "beta", "prerelease": true }
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{ "type": "docs", "release": "patch" },
{ "type": "refactor", "release": "patch" },
{ "type": "style", "release": "patch" },
{ "type": "ci", "release": "patch" },
{ "type": "chore", "release": "patch" }
]
}
],
[
"@semantic-release/release-notes-generator",
{
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"preset": "conventionalcommits", // I used angular preset and failed too
"presetConfig": {
"types": [
{
"type": "breaking",
"section": "β Breaking β",
"hidden": false
},
{ "type": "feat", "section": "β¨ Feature β¨", "hidden": false },
{ "type": "fix", "section": "π Bugfix π", "hidden": false },
{ "type": "hotfix", "section": "π₯ Hotfix π₯", "hidden": false },
{
"type": "BREAKING",
"section": "β Breaking β",
"hidden": false
},
{ "type": "HOTFIX", "section": "π₯ Hotfix π₯", "hidden": false }
]
}
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md"],
"message": "build: π ${nextRelease.gitTag} has been released \n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"assets": ["dist/assets/**"]
}
]
]
}
and this is the generated CHANGELOG.md
# 1.0.0 (2022-12-29)
### Features
- :sparkles: add 404 not found page ([3c862d3](https://github.com/tomavic/myreads-tracker/commit/3c862d39c7723715b2397908ab63b7d154d1daf6))
- :sparkles: add book details page ([556caca](https://github.com/tomavic/myreads-tracker/commit/556caca2e4086330cc9c2fe95fa94db3f1871491))
- :sparkles: add project files ([7805ac1](https://github.com/tomavic/myreads-tracker/commit/7805ac18bf1eee3da4549fb935cf2c943c217a86))
- :sparkles: first commit ([1a4b6f3](https://github.com/tomavic/myreads-tracker/commit/1a4b6f3b0fc33c94f78598aa3558daf2b4b06516))
- :sparkles: style and favicon ([9501b1c](https://github.com/tomavic/myreads-tracker/commit/9501b1c7f0a19814129c8f73952d475bc377d3c6))
- :sparkles: use `useRoutes` ([adbd18f](https://github.com/tomavic/myreads-tracker/commit/adbd18f34e13f18c72388474e42af20541cb1ab5))
Do you not just need to add βchoreβ into your release-generator types?
{"type": "chore", "hidden": true},
I already did that, please check the demo project
https://github.com/tomavic/myreads-tracker/blob/main/CHANGELOG.md
I found the solution after many searches here https://github.com/semantic-release/release-notes-generator/issues/153
My searches has fall to https://github.com/mathieudutour/github-tag-action/issues/68 and I noticed that I must remove the default preset Angular and add "preset": "conventionalcommits", and install the conventional-changelog-conventionalcommits from here https://www.npmjs.com/package/conventional-changelog-conventionalcommits
This part is not clear in the documentation