Open oesteban opened 1 year ago
OK for the feature, I can review PRs if you're willing to send one :slightly_smiling_face:
I'll gladly contribute, specially after seeing your responsiveness :)
Question before I dive in. Here: https://github.com/pawamoy/git-changelog/blob/86a8f98aee98e426c1371e6e7d439be98a876d9d/src/git_changelog/commit.py#L280-L296 I can see that the commit types are set in the dict, and then the keys are joined together within the regex.
A naive approach would be adding the new keywords and associating them to existing sections, however this is bound to fail since you want to have a single id for the section.
Would it make sense to change this dictionary to tuples of section tuple and lists/tuples of regex tokens like ("Features", ("feat", "enh")])
or ("Style", ("sty(le)?[:\]\ ]")
?
I'm not sure to understand. If you look at the dict, you'll see that we can have multiple keys (commit type) for the same value (section title), for example test
and tests
for "Tests", or ref
and refactor
for "Code Refactoring". Could we not add "sty": "Style"
and "enh": "Features"
to the dict dynamically?
Right, sorry for my sloppiness when looking at it. Good I asked - then this PR can focus on enabling the CLI to have a language for these additions.
No worries! Yep, sounds right :slightly_smiling_face:
Is your feature request related to a problem? Please describe. The CLI currently allows little room for flexibility on the convention side. Either being able to provide custom conventions or a utility to add prefixes to sections would be very much appreciated.