Skip to content

Commit

Permalink
chore: move changelog change type map to template
Browse files Browse the repository at this point in the history
Hatch has some problems with UTF chars in `pyproject.toml` on windows.

Refs: pypa/hatch#1677
  • Loading branch information
mih committed Sep 23, 2024
1 parent 7a2cba0 commit d3ba545
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 @@ -275,12 +275,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 d3ba545

Please sign in to comment.