pawamoy / git-changelog

Automatic Changelog generator using Jinja2 templates.
https://pawamoy.github.io/git-changelog
ISC License
132 stars 33 forks source link

Customizing code convention #59

Open sandzhaj opened 9 months ago

sandzhaj commented 9 months ago

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

pawamoy commented 9 months ago

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.

sandzhaj commented 9 months ago

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. :)

sandzhaj commented 9 months ago

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."