Fix rendered changelog with new version of towncrier (#1598)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
50fe89d74b
commit
639caf057d
5 changed files with 69 additions and 24 deletions
1
changelogs/internal/newsfragments/1598.clarification
Normal file
1
changelogs/internal/newsfragments/1598.clarification
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix rendered changelog with new version of towncrier.
|
|
@ -1,39 +1,66 @@
|
||||||
[tool.towncrier]
|
[tool.towncrier]
|
||||||
version = "unused"
|
version = "unused"
|
||||||
filename = "../rendered.md"
|
filename = "rendered.md"
|
||||||
issue_format = "[#{issue}](https://github.com/matrix-org/matrix-spec/issues/{issue})"
|
template = "template.md.jinja"
|
||||||
title_format = "### {name}" # Matches rendered spec, even if awkward
|
|
||||||
underlines = " " # 3 spaces intentionally to hide RST headings
|
|
||||||
|
|
||||||
# Note: The names below have the <strong> tag built-in so the rendered spec *and* the generated
|
|
||||||
# changelog can benefit from sane headings.
|
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "breaking"
|
directory = "breaking"
|
||||||
name = "<strong>Breaking Changes</strong>"
|
name = "Breaking Changes"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "deprecation"
|
directory = "deprecation"
|
||||||
name = "<strong>Deprecations</strong>"
|
name = "Deprecations"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "new"
|
directory = "new"
|
||||||
name = "<strong>New Endpoints</strong>"
|
name = "New Endpoints"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "removal"
|
directory = "removal"
|
||||||
name = "<strong>Removed Endpoints</strong>"
|
name = "Removed Endpoints"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "feature"
|
directory = "feature"
|
||||||
name = "<strong>Backwards Compatible Changes</strong>"
|
name = "Backwards Compatible Changes"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "clarification"
|
directory = "clarification"
|
||||||
name = "<strong>Spec Clarifications</strong>"
|
name = "Spec Clarifications"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Client-Server API"
|
||||||
|
path = "client_server"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Server-Server API"
|
||||||
|
path = "server_server"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Application Service API"
|
||||||
|
path = "application_service"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Identity Service API"
|
||||||
|
path = "identity_service"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Push Gateway API"
|
||||||
|
path = "push_gateway"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Room Versions"
|
||||||
|
path = "room_versions"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Appendices"
|
||||||
|
path = "appendices"
|
||||||
|
|
||||||
|
[[tool.towncrier.section]]
|
||||||
|
name = "Internal Changes/Tooling"
|
||||||
|
path = "internal"
|
||||||
|
|
24
changelogs/template.md.jinja
Normal file
24
changelogs/template.md.jinja
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{% 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 %}
|
|
@ -13,15 +13,8 @@ cd `dirname $0`/../changelogs
|
||||||
# Pre-cleanup just in case it wasn't done on the last run
|
# Pre-cleanup just in case it wasn't done on the last run
|
||||||
rm -f rendered.md
|
rm -f rendered.md
|
||||||
|
|
||||||
# Reversed order so that room versions ends up on the bottom
|
# Generate changelog
|
||||||
towncrier --name "Internal Changes/Tooling" --dir "./internal" --config "./pyproject.toml" --yes
|
towncrier --yes
|
||||||
towncrier --name "Appendices" --dir "./appendices" --config "./pyproject.toml" --yes
|
|
||||||
towncrier --name "Room Versions" --dir "./room_versions" --config "./pyproject.toml" --yes
|
|
||||||
towncrier --name "Push Gateway API" --dir "./push_gateway" --config "./pyproject.toml" --yes
|
|
||||||
towncrier --name "Identity Service API" --dir "./identity_service" --config "./pyproject.toml" --yes
|
|
||||||
towncrier --name "Application Service API" --dir "./application_service" --config "./pyproject.toml" --yes
|
|
||||||
towncrier --name "Server-Server API" --dir "./server_server" --config "./pyproject.toml" --yes
|
|
||||||
towncrier --name "Client-Server API" --dir "./client_server" --config "./pyproject.toml" --yes
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# Prepare the header
|
# Prepare the header
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# current at the time of writing
|
# current at the time of writing
|
||||||
|
|
||||||
# we need at least version 4.0.0 for support of JSON Schema Draft 2020-12.
|
# we need at least version 4.0.0 for support of JSON Schema Draft 2020-12.
|
||||||
jsonschema >= 4.0.0
|
jsonschema == 4.17.3
|
||||||
|
|
||||||
PyYAML >= 3.12
|
PyYAML >= 3.12
|
||||||
requests >= 2.18.4
|
requests >= 2.18.4
|
||||||
towncrier == 21.9.0rc1
|
towncrier == 23.6.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue