Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
configure towncrier template
Browse files Browse the repository at this point in the history
  • Loading branch information
popravich committed Apr 23, 2019
1 parent 4f43762 commit e8c33e3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions CHANGES/template.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{% 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 }}
(see {{ values|join(',\n ') }});
{% endfor %}

{% else %}
- {{ sections[section][category]['']|join(',\n ') }};

{% endif %}
{% if sections[section][category]|length == 0 %}
No significant changes.

{% else %}
{% endif %}
{% endfor %}
{% else %}
No significant changes.


{% endif %}
{% endfor %}
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ filename = "CHANGES.txt"
title_format = "{version} ({project_date})"

underlines = [ '^', '~', '"' ]

issue_format = "`#{issue} <https://github.com/aio-libs/aioredis/issues/{issue}>`_"
template = "CHANGES/template.jinja"

0 comments on commit e8c33e3

Please sign in to comment.