git-conventional-commits
git-conventional-commits copied to clipboard
RFE: allow to use multiple commit types per changelog section
Would you be open to a change that would allow to group several commit types inside a changelog section, configuration could be something like:
headlines:
feat: Features
"fix,style": Enhancements
perf: Performance Improvements
"ci,build,ops": CI/CD
"chore,docs": Misc
breakingChange: BREAKING CHANGES
Note that such a change is backward compatible with what exists today.
Hi @McFoggy, your idea sounds interesting. But first thing first :-) what does RFE stands for?
I think the easiest solution would be to set the same headline for the types and group by headlines, this way you get an syntax error in yaml if you define a value twice.
Example
headlines:
feat: Features
fix: Enhancements
style: Enhancements
perf: Performance Improvements
ci: CI/CD
build: CI/CD
ops: CI/CD
chore: Misc
docs: Misc
breakingChange: BREAKING CHANGES
Because it is an edge case, the redundancy is okay in my opinion. WDYT?
Or I could add a new sections field e.g.
sections:
Features: [feat]
Enhancements: [fix, style]
Performance Improvements: [perf]
CI/CD: [ci, build, ops]
Misc: [chore, docs]
BREAKING CHANGES: [breakingChange]
The new approach could also replace the commitTypeslist
before
changelog:
commitTypes:
- feat
- fix
- perf
- merge
headlines:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
merge: Merges
breakingChange: BREAKING CHANGES
changelog:
categories:
Features: [feat]
Bug Fixes: [fix]
Performance Improvements: [perf]
Merges: [merge]
BREAKING CHANGES: [breakingChange]
or
changelog:
categories:
- title: Features
commitTypes:
- feat
- title: Bug Fixes
commitTypes:
- fix
- title: Performance Improvements
commitTypes:
- perf
- title: Merges
commitTypes:
- merge
- title: BREAKING CHANGES
commitTypes:
- breakingChange
WDYT?