pawamoy/git-changelog

Customizing code convention

Opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
The idea of PR #56 seems awesome. It could bring some configuration freedom like in git-cliff. This would also free up those who would like to translate the CHANGELOG.md sections into their native language.

Describe the solution you'd like
I'll push solution today

Do you want to continue the work in #56? Or maybe @oesteban was just waiting for #55 to be released, which is now the case.

I'm working on my branch and it's almost done, but I'm slightly stuck with the sections. I'm unsure about @oesteban's progress. I noticed that #55 was merged in August and using it for a month, but I need that functionality for now, so I started working on it. :)

Ok, here we are

Example

[tool.git-changelog]
convention = "conventional"
sections = "build,chore,doc,n,feat"
minor-types = "feat,n"
...

[tool.git-changelog.rewrite-convention]
build = "Build"
chore = "Chore"
ci = "Continuous Integration"
deps = "Dependencies"
doc = "Documentation"
feat = "Features"
n = "Notes"

We initially choose our convention from the basic, conventional, or angular options. If we want to customize (or translate) our convention, we define a rewrite-convention with all the TYPES we intend to use. In this case, specifying sections is mandatory. Additionally, we can use minor-types to specify types for minor versions, especially if the default convention option doesn't suit our needs."