conventional-changelog
conventional-changelog copied to clipboard
Customizing types seems to not do anything
Following the Preset docs, it looks like preset can accept a types array where you can rename types and turn them off.
Here's what my .release-it.js
file looks like:
module.exports = {
npm: {
publish: false,
},
git: {
commitMessage: "chore: release v${version}",
push: false,
requireBranch: "main",
requireCleanWorkingDir: true,
},
plugins: {
"@release-it/conventional-changelog": {
infile: "CHANGELOG.md",
preset: {
name: "conventionalcommits",
types: [
{ type: "feat", section: "✨ New Features" },
{ type: "perf", section: "🚀 Performance" },
{ type: "fix", section: "🐛 Bug Fixes" },
{ type: "style", section: "💅 Visual Updates" },
{ type: "build", section: "🛠 Builds" },
{ type: "ci", section: "⚙️ CI" },
{ type: "docs", section: "📚 Documentation" },
{ type: "chore", hidden: true },
{ type: "refactor", hidden: true },
{ type: "test", hidden: true },
],
},
writerOpts: {
transform(commit, context) {
const jira = new RegExp(/MC-[0-9]+/, "i");
if (jira.test(commit.scope)) {
const [issue] = commit.scope.match(jira);
commit.scope = `[${issue}](${jira_url}/${issue})`;
}
commit.shortHash = commit.hash.substring(0, 7);
return commit;
},
},
},
},
hooks: {
"before:init": ["git fetch origin", "git reset --hard origin/main"],
"after:release": "./.release/publish-prod.sh",
},
};
But this is what was generated
## [1.72.0](<branch compare url>) (2023-11-28)
### feat
* ...
### chore
* ...
### fix
* ...
### refactor
* ...
### build
* ...
You can see that section names are not being used and also the chore
and refactor
sections which are supposed to be hidden are visible.
Is there another way of doing this?