Update template and use a more power full configuration

This commit is contained in:
Benoit Marty 2021-06-18 21:21:52 +02:00
parent eea18fb71c
commit d6363a6e1b
3 changed files with 32 additions and 19 deletions

View file

@ -1 +1 @@
User defined top level spaces ordering (#3501) User defined top level spaces ordering

View file

@ -15,19 +15,8 @@
{% if sections[section] %} {% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%} {% for category, val in definitions.items() if category in sections[section]%}
{% if definitions[category]['name'] == "Features" %}
Features ✨:
{% elif definitions[category]['name'] == "Bugfixes" %}
Bugfixes 🐛:
{% elif definitions[category]['name'] == "Deprecations and Removals" %}
SDK API changes ⚠️:
{% elif definitions[category]['name'] == "Improved Documentation" %}
Improved Documentation 📚:
{% elif definitions[category]['name'] == "Misc" %}
Other changes:
{% else %}
{{ definitions[category]['name'] }} {{ definitions[category]['name'] }}
{% endif %} {{ underline * definitions[category]['name']|length }}
{% if definitions[category]['showcontent'] %} {% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %} {% for text, values in sections[section][category].items() %}
- {{ text }} ({{ values|join(', ') }}) - {{ text }} ({{ values|join(', ') }})

View file

@ -1,7 +1,31 @@
[tool.towncrier] [tool.towncrier]
directory = "changelog.d" directory = "changelog.d"
filename = "CHANGES.md" filename = "CHANGES.md"
name = "Changes in Element" name = "Changes in Element"
# Note: there is a bug, if I use title_format, the title is printed twice template = "tools/towncrier/template.md"
# title_format = "Changes in Element {version} ({project_date})" issue_format = "[#{issue}](https://github.com/vector-im/element-android/issues/{issue})"
template="tools/towncrier/template.md"
[[tool.towncrier.type]]
directory = "feature"
name = "Features ✨"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes 🐛"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation 📚"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "SDK API changes ⚠️"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Other changes"
showcontent = true