diff --git a/changelog.d/2394.doc.rst b/changelog.d/2394.doc.rst new file mode 100644 index 0000000000..338e8895d5 --- /dev/null +++ b/changelog.d/2394.doc.rst @@ -0,0 +1,3 @@ +Extended towncrier news template to include change note categories. +This allows to see what types of changes a given version introduces +-- by :user:`webknjaz` diff --git a/pyproject.toml b/pyproject.toml index cd66e2773e..2d36286555 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ backend-path = ["."] title_format = "v{version}" issue_format = "#{issue}" template = "towncrier_template.rst" - underlines = ["-"] + underlines = ["-", "^"] [[tool.towncrier.type]] directory = "deprecation" diff --git a/towncrier_template.rst b/towncrier_template.rst index fbc5ef03b0..31098b7cf6 100644 --- a/towncrier_template.rst +++ b/towncrier_template.rst @@ -1,10 +1,14 @@ {% 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() %} * {{ values|join(', ') }}: {{ text }}