Open isabr85 opened 3 years ago
So the commit analyzer has nothing to do with writing the changelog. It just tells semantic-release whether there should be a release or not.
@semantic-release/release-notes-generator
determines which commit types
show up in the changelog and IIRC default it's just feat and fix types.
I'll share part of my config show you hopefully you'll get the idea:
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "New Feature(s) 🚀"
},
{
"type": "fix",
"section": "Bug Fix(es) 🐛️"
},
{
"type": "docs",
"section": "Documentation Changes 📝"
},
{
"type": "refactor",
"section": "Code Refactoring 💅"
},
{
"type": "test",
"section": "Tests 📡️"
},
{
"type": "perf",
"section": "Performance Improvement(s) 🚄️"
},
{
"type": "build",
"section": "Build system 🛠️"
}
]
}
}
],
Let me know if this helps 😄
@tmeijn this worked and helped understand what was going on with the empty changelog, but I notice that for the breaking changes it is using a section called ⚠ BREAKING CHANGES, I tried to change this by using the same config you provided but adding another config at the start (just added it for feat! to see if it works but not so far):
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"breaking": true,
"type": "feat!",
"section": "BREAKING"
},
{
"type": "feat",
"section": "New Feature(s) 🚀"
},
{
"type": "fix",
"section": "Bug Fix(es) 🐛️"
},
{
"type": "docs",
"section": "Documentation Changes 📝"
},
{
"type": "refactor",
"section": "Code Refactor 💅"
},
{
"type": "test",
"section": "Tests 📡️"
},
{
"type": "perf",
"section": "Performance Improvement(s) 🚄️"
},
{
"type": "build",
"section": "Build system 🛠️"
}
]
}
}
]
In other words I could not figure out how to change the section name for the breaking changes, appreciate any help/guidance/guesses
Hey @arkadioz, sorry for the late response, but that section is hard coded in the conventionalcommits
package. I started an effort a long time ago (https://github.com/conventional-changelog/conventional-changelog/pull/981/files) to make it configurable, but abandoned the PR it will likely not get to it soon/at all.
I've added to @semantic-release/commit-analyzer plugin a list of types under releaseRules:
It seems to be fine, when I make a commit of one of the types displayed in the list I can clearly see that release version is being increasing according to my definition. But then I am looking at CHANGELOG.md file and it seems that commits are not being written and it left blanked.
Any idea what can cause this issue? I tried to search for a solution for this scenario few days and I feel I don't have any way to solve it by my own.
Can you tell me what is wrong with my script?