From 24893b6be588930d8d19a6cd4cb4ad92058b0c6b Mon Sep 17 00:00:00 2001 From: Alex Luck Date: Wed, 14 Oct 2026 09:45:28 -0700 Subject: [PATCH] Python(chore): add section headings to the changelog template --- python/changelog.d/+changelog-section-headings.chore.md | 0 python/changelog.d/template.md.jinja | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 python/changelog.d/+changelog-section-headings.chore.md diff --git a/python/changelog.d/+changelog-section-headings.chore.md b/python/changelog.d/+changelog-section-headings.chore.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/changelog.d/template.md.jinja b/python/changelog.d/template.md.jinja index 0286408769..468b78d15f 100644 --- a/python/changelog.d/template.md.jinja +++ b/python/changelog.d/template.md.jinja @@ -3,12 +3,16 @@ {% endif %} {% for category in ["breaking", "feat", "fix"] %} -{% for text, values in sections[""].get(category, {}).items() %} +{% if sections[""].get(category) %} +### {{ definitions[category]["name"] }} + +{% for text, values in sections[""][category].items() %} {% set lines = text.strip().split("\n", 1) %} - {{ lines[0] }}{% if values %} ({{ values|join(", ") }}){% endif %}{{ "" }} {% if lines|length > 1 %} {{ lines[1] }} {% endif %} {% endfor %} + +{% endif %} {% endfor %} -{{ "\n" }}