From baaa6bf021e41fcb340c49d02b5cd09edf0036e6 Mon Sep 17 00:00:00 2001 From: Mara Robin B <mara@broda.me> Date: Mon, 6 Mar 2023 20:36:13 +0100 Subject: [PATCH] changelog: update template for new label behavior (E3/E4) (#6804) * update changelog template for new label behavior (E3/E4) This distinguishes E3 and E4 labels in the changelog output * Separate E3/E4 notices in changelog * fixup --- .../templates/host_functions.md.tera | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/polkadot/scripts/ci/changelog/templates/host_functions.md.tera b/polkadot/scripts/ci/changelog/templates/host_functions.md.tera index 6d9d09a43da..9337de47969 100644 --- a/polkadot/scripts/ci/changelog/templates/host_functions.md.tera +++ b/polkadot/scripts/ci/changelog/templates/host_functions.md.tera @@ -1,31 +1,42 @@ {%- import "change.md.tera" as m_c -%} {%- set_global host_fn_count = 0 -%} +{%- set_global upgrade_first = 0 -%} {% for pr in changes | sort(attribute="merged_at") -%} {%- if pr.meta.B and pr.meta.B.B0 -%} {#- We skip silent ones -#} {%- else -%} - {%- if pr.meta.E and pr.meta.E.E4 -%} + {%- if pr.meta.E and pr.meta.E.E3 -%} {%- set_global host_fn_count = host_fn_count + 1 -%} - {{ m_c::change(c=pr) }} {% endif -%} {% endif -%} + {%- if pr.meta.E and pr.meta.E.E4 -%} + {%- set_global upgrade_first = upgrade_first + 1 -%} + - {{ m_c::change(c=pr) }} + {% endif -%} + {% endif -%} {%- endfor -%} +<!-- {{ upgrade_first }} changes require node upgrade --> + +{%- if upgrade_first != 0 %} +## Node upgrade required +âš ï¸ There is a runtime change that will require nodes to be upgraded BEFORE the runtime upgrade. + +âš ï¸ It is critical that you update your client before the chain switches to the new runtime. +{%- endif %} + <!-- {{ host_fn_count }} host functions were detected --> ## Host functions -{%- if host_fn_count == 0 %} +{% if host_fn_count == 0 %} â„¹ï¸ This release does not contain any new host functions. {% elif host_fn_count == 1 -%} {# ---- #} -âš ï¸ The runtimes in this release contain one new **host function**. - -âš ï¸ It is critical that you update your client before the chain switches to the new runtime. +â„¹ï¸ The runtimes in this release contain one new **host function**. {%- else -%} -âš ï¸ The runtimes in this release contain {{ host_fn_count }} new **host function{{ host_fn_count | pluralize }}**. - -âš ï¸ It is critical that you update your client before the chain switches to the new runtime. +â„¹ï¸ The runtimes in this release contain {{ host_fn_count }} new **host function{{ host_fn_count | pluralize }}**. {%- endif %} -- GitLab