From d0f8a67f3b65c0c204ec2a1952896a37556bee5e Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Wed, 2 Jul 2025 09:29:39 +0100 Subject: [PATCH] Swap order of fixed and changed in release notes --- newsfragments/600.changed.md | 1 + pyproject.toml | 8 ++++---- scripts/towncrier_to_helm_annotation.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 newsfragments/600.changed.md diff --git a/newsfragments/600.changed.md b/newsfragments/600.changed.md new file mode 100644 index 00000000..baa83c98 --- /dev/null +++ b/newsfragments/600.changed.md @@ -0,0 +1 @@ +Tweak changelog sections ordering. diff --git a/pyproject.toml b/pyproject.toml index ac255435..57a85c21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,13 +93,13 @@ name = "Added" showcontent = true [[tool.towncrier.type]] -directory = "fixed" -name = "Fixed" +directory = "changed" +name = "Changed" showcontent = true [[tool.towncrier.type]] -directory = "changed" -name = "Changed" +directory = "fixed" +name = "Fixed" showcontent = true [[tool.towncrier.type]] diff --git a/scripts/towncrier_to_helm_annotation.py b/scripts/towncrier_to_helm_annotation.py index 8779fa74..669ca113 100755 --- a/scripts/towncrier_to_helm_annotation.py +++ b/scripts/towncrier_to_helm_annotation.py @@ -25,7 +25,7 @@ def find_news_fragments(root_dir): ) ) new_fragments = list({"description": description, "kind": kind} for description, kind in unique_new_fragments) - kind_order = ["security", "deprecated", "added", "fixed", "changed", "removed"] + kind_order = ["security", "deprecated", "added", "changed", "fixed", "removed"] # We order the list by kind and description alphabetically new_fragments.sort(key=lambda x: str(kind_order.index(x["kind"])) + x["description"]) return new_fragments