Skip to content

Commit

Permalink
chore: consolidate changelog "looks" in template
Browse files Browse the repository at this point in the history
Before the mapping from change type keys to verbose names was in
`pyproject.toml`, but that file is quite full already. We need not
have it be concerned with the looks of changelog generation, when
most of that is in the template already.
  • Loading branch information
mih committed Sep 22, 2024
1 parent cc14db9 commit b303cc0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 10 additions & 1 deletion .changelog.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@

{% for change_key, changes in entry.changes.items() %}

{% set change_key_map = {
'BREAKING CHANGE': 'πŸͺ“ Breaking changes',
'doc': 'πŸ“ Documentation',
'feat': 'πŸ’« New features',
'fix': 'πŸ› Bug Fixes',
'test': 'πŸ›‘ Tests',
'rf': '🏠 Refactorings',
'perf': 'πŸš€ Performance improvements',
} %}
{% if change_key %}
## {{ change_key }}
## {{ change_key_map.get(change_key, change_key) }}
{% endif %}
{% set scopemap = {
'changelog': 'Changelog',
Expand Down
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,3 @@ schema_pattern = "(?s)(ci|doc|feat|fix|perf|rf|style|test|chore|revert|bump)(\\(
"^BREAKING" = "MAJOR"
"^feat" = "MINOR"
"^fix" = "PATCH"

[tool.commitizen.customize.change_type_map]
"BREAKING CHANGE" = "Breaking changes"
doc = "Documentation"
feat = "New features"
fix = "Bug Fixes"
test = "Tests"
rf = "Refactorings"
perf = "Performance improvements"

0 comments on commit b303cc0

Please sign in to comment.