From 6e036fcec7d49840a5118c5a051b7fedd5bdf6ce Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Sun, 22 Sep 2024 06:44:57 +0200 Subject: [PATCH] chore: move changelog change type map to template Hatch has some problems with UTF chars in `pyproject.toml` on windows. Refs: https://github.com/pypa/hatch/issues/1677 --- .changelog.md.j2 | 11 ++++++++++- pyproject.toml | 9 --------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.changelog.md.j2 b/.changelog.md.j2 index 7e49cf25..292032ba 100644 --- a/.changelog.md.j2 +++ b/.changelog.md.j2 @@ -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', diff --git a/pyproject.toml b/pyproject.toml index 141ae79d..b0304ace 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"