diff --git a/CHANGES/.TEMPLATE.rst b/CHANGES/.TEMPLATE.rst new file mode 100644 index 00000000..a27a1994 --- /dev/null +++ b/CHANGES/.TEMPLATE.rst @@ -0,0 +1,36 @@ +{# TOWNCRIER TEMPLATE #} +{% for section, _ in sections.items() %} +{% set underline = underlines[0] %}{% if section %}{{section}} +{{ underline * section|length }}{% set underline = underlines[1] %} + +{% endif %} + +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section]%} +{{ definitions[category]['name'] }} +{{ underline * definitions[category]['name']|length }} + +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category].items() %} +- {{ text + '\n' }} + {{ values|join(',\n ') + '\n' }} +{% endfor %} + +{% else %} +- {{ sections[section][category]['']|join(', ') }} + +{% endif %} +{% if sections[section][category]|length == 0 %} +No significant changes. + +{% else %} +{% endif %} + +{% endfor %} +{% else %} +No significant changes. + + +{% endif %} +{% endfor %} +---- diff --git a/towncrier.toml b/towncrier.toml index 218cf128..605cc4d8 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -3,6 +3,7 @@ filename = "CHANGES.rst" directory = "CHANGES/" title_format = "{version} ({project_date})" + template = "CHANGES/.TEMPLATE.rst" issue_format = ":issue:`{issue}`" # NOTE: The types are declared because: