diff --git a/changelogs/pyproject.toml b/changelogs/pyproject.toml index d32f6415..91f7f56b 100644 --- a/changelogs/pyproject.toml +++ b/changelogs/pyproject.toml @@ -1,39 +1,34 @@ [tool.towncrier] version = "unused" filename = "../rendered.md" - issue_format = "[#{issue}](https://github.com/matrix-org/matrix-spec/issues/{issue})" - title_format = "### {name}" # Matches rendered spec, even if awkward - underlines = " " # 3 spaces intentionally to hide RST headings - - # Note: The names below have the tag built-in so the rendered spec *and* the generated - # changelog can benefit from sane headings. + template = "template.md.jinja" [[tool.towncrier.type]] directory = "breaking" - name = "Breaking Changes" + name = "Breaking Changes" showcontent = true [[tool.towncrier.type]] directory = "deprecation" - name = "Deprecations" + name = "Deprecations" showcontent = true [[tool.towncrier.type]] directory = "new" - name = "New Endpoints" + name = "New Endpoints" showcontent = true [[tool.towncrier.type]] directory = "removal" - name = "Removed Endpoints" + name = "Removed Endpoints" showcontent = true [[tool.towncrier.type]] directory = "feature" - name = "Backwards Compatible Changes" + name = "Backwards Compatible Changes" showcontent = true [[tool.towncrier.type]] directory = "clarification" - name = "Spec Clarifications" + name = "Spec Clarifications" showcontent = true diff --git a/changelogs/template.md.jinja b/changelogs/template.md.jinja new file mode 100644 index 00000000..1e3ee6c2 --- /dev/null +++ b/changelogs/template.md.jinja @@ -0,0 +1,27 @@ +{% if versiondata.name %} +### {{ versiondata.name }} +{% endif %} +{% for section_name, section in sections.items() %} +{% if section_name %} + +### {{section_name}} +{% endif %} + +{% if section %} +{% for category, val in definitions.items() if category in section %} +**{{ definitions[category]['name'] }}** + +{% for content, issues in section[category].items() %} +- {{ content }} ( +{%- for issue in issues %} +[{{issue}}](https://github.com/matrix-org/matrix-spec/issues/{{issue|trim('#')}}){% if not loop.last %}, {% endif %} +{%- endfor %} +) +{% endfor %} + +{% endfor %} +{% else %} +No significant changes. + +{% endif %} +{% endfor %} diff --git a/scripts/requirements.txt b/scripts/requirements.txt index a3ff4f0b..18635a7f 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -6,4 +6,4 @@ jsonschema >= 4.0.0 PyYAML >= 3.12 requests >= 2.18.4 -towncrier == 21.9.0rc1 +towncrier == 23.6.0