From c70834aa8d7b0b3e0d9beb546009b2cfa783be16 Mon Sep 17 00:00:00 2001
From: Mara Robin B <mara@broda.me>
Date: Thu, 19 Jan 2023 20:24:03 +0100
Subject: [PATCH] Update changelog templates to use new labels (#6585)

* Update changelog template to use new T labels

* update readme

* changelog gen: remove T6
---
 polkadot/scripts/ci/changelog/README.md                    | 7 +++----
 polkadot/scripts/ci/changelog/templates/change.md.tera     | 5 -----
 .../scripts/ci/changelog/templates/changes_client.md.tera  | 2 +-
 .../scripts/ci/changelog/templates/changes_misc.md.tera    | 4 ++--
 .../scripts/ci/changelog/templates/changes_runtime.md.tera | 2 +-
 .../scripts/ci/changelog/templates/high_priority.md.tera   | 2 +-
 6 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/polkadot/scripts/ci/changelog/README.md b/polkadot/scripts/ci/changelog/README.md
index 2386f7c1b52..80795438b10 100644
--- a/polkadot/scripts/ci/changelog/README.md
+++ b/polkadot/scripts/ci/changelog/README.md
@@ -44,10 +44,9 @@ Currently, the considered labels are:
 - E4 => new host function
 - E2 => database migration
 - B0 => silent, not showing up
-- B1-releasenotes (misc unless other labels)
-- B5-client (client changes)
-- B7-runtimenoteworthy (runtime changes)
-- T6-XCM
+- B1 => noteworthy
+- T0 => node
+- T1 => runtime
 
 Note that labels with the same letter are mutually exclusive.
 A PR should not have both `B0` and `B5`, or both `C1` and `C9`. In case of conflicts, the template will
diff --git a/polkadot/scripts/ci/changelog/templates/change.md.tera b/polkadot/scripts/ci/changelog/templates/change.md.tera
index 432b93eb687..6d133439e2e 100644
--- a/polkadot/scripts/ci/changelog/templates/change.md.tera
+++ b/polkadot/scripts/ci/changelog/templates/change.md.tera
@@ -33,10 +33,5 @@
 {%- set repo = "   " -%}
 {%- endif -%}
 
-{%- if c.meta.T and c.meta.T.value == 6 -%}
-{%- set xcm = " [✉️ XCM]" -%}
-{%- else -%}
-{%- set xcm = "" -%}
-{%- endif -%}
 {{- repo }} {{ audit }}[`#{{c.number}}`]({{c.html_url}}) {{- prio }} - {{ c.title | capitalize | truncate(length=120, end="…") }}{{xcm }}
 {%- endmacro change -%}
diff --git a/polkadot/scripts/ci/changelog/templates/changes_client.md.tera b/polkadot/scripts/ci/changelog/templates/changes_client.md.tera
index 36fb6b9de68..5c911407ac9 100644
--- a/polkadot/scripts/ci/changelog/templates/changes_client.md.tera
+++ b/polkadot/scripts/ci/changelog/templates/changes_client.md.tera
@@ -9,7 +9,7 @@
     {#- We skip silent ones -#}
     {%- else -%}
 
-        {%- if pr.meta.B.value == 5 and not pr.title is containing("ompanion") %}
+        {%- if pr.meta.T and pr.meta.T.value == 0 and not pr.title is containing("ompanion") %}
 - {{ m_c::change(c=pr) }}
         {%- endif -%}
     {% endif -%}
diff --git a/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera b/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera
index 3ad1e1d222b..9c5662f70ae 100644
--- a/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera
+++ b/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera
@@ -7,7 +7,7 @@
         {%- if pr.meta.B.value == 0 -%}
         {#- We skip silent ones -#}
         {%- else -%}
-            {%- if pr.meta.B and pr.meta.B.value != 5 and pr.meta.B.value != 7 or pr.meta.C or not pr.meta.B %}
+            {%- if pr.meta.T and pr.meta.T.value == 0 %}
 {%- set_global misc_count = misc_count + 1 -%}
             {%- endif -%}
         {% endif -%}
@@ -27,7 +27,7 @@ There are other misc. changes. You can expand the list below to view them all.
         {%- if pr.meta.B.value == 0 %}
         {#- We skip silent ones -#}
         {%- else -%}
-            {%- if pr.meta.B and pr.meta.B.value != 5 and pr.meta.B.value != 7 or pr.meta.C or not pr.meta.B %}
+            {%- if pr.meta.T and pr.meta.T.value == 0 %}
 - {{ m_c::change(c=pr) }}
             {%- endif -%}
         {% endif -%}
diff --git a/polkadot/scripts/ci/changelog/templates/changes_runtime.md.tera b/polkadot/scripts/ci/changelog/templates/changes_runtime.md.tera
index 67da1ebbc39..db7f6bff111 100644
--- a/polkadot/scripts/ci/changelog/templates/changes_runtime.md.tera
+++ b/polkadot/scripts/ci/changelog/templates/changes_runtime.md.tera
@@ -10,7 +10,7 @@
 {#- We skip silent ones -#}
 {%- else -%}
 
-{%- if pr.meta.B.value == 7 and not pr.title is containing("ompanion") %}
+{%- if pr.meta.T and pr.meta.T.value == 1 and not pr.title is containing("ompanion") %}
 - {{ m_c::change(c=pr) }}
 {%- endif -%}
 {%- endif -%}
diff --git a/polkadot/scripts/ci/changelog/templates/high_priority.md.tera b/polkadot/scripts/ci/changelog/templates/high_priority.md.tera
index 117d335efdc..aabc9f01f62 100644
--- a/polkadot/scripts/ci/changelog/templates/high_priority.md.tera
+++ b/polkadot/scripts/ci/changelog/templates/high_priority.md.tera
@@ -25,7 +25,7 @@ The changes motivating this priority level are:
     {%- if pr.meta.C -%}
         {%- if pr.meta.C.value == p %}
 - {{ m_c::change(c=pr) }}
-{%- if pr.meta.B and pr.meta.B.value == 7 %} (RUNTIME)
+{%- if pr.meta.T and pr.meta.T.value == 1 %} (RUNTIME)
 {% endif %}
         {%- endif -%}
     {%- endif -%}
-- 
GitLab