From 7cbe7c9586e5d3d513b187f2ff6b4bcf29921a56 Mon Sep 17 00:00:00 2001 From: Chevdor Date: Wed, 6 Jul 2022 11:25:26 +0200 Subject: [PATCH] Several small fixes to the templates of the release notes (#5756) --- .../changelog/templates/changes_misc.md.tera | 2 +- .../templates/global_priority.md.tera | 9 +-------- .../changelog/templates/high_priority.md.tera | 6 ++---- .../changelog/templates/host_functions.md.tera | 1 + .../changelog/templates/migrations-db.md.tera | 4 ++-- .../templates/migrations-runtime.md.tera | 2 +- .../ci/changelog/templates/runtime.md.tera | 18 +++++++++--------- .../ci/changelog/templates/runtimes.md.tera | 2 ++ .../ci/changelog/templates/template.md.tera | 1 - 9 files changed, 19 insertions(+), 26 deletions(-) diff --git a/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera b/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera index 7585eb8bc5..3ad1e1d222 100644 --- a/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera +++ b/polkadot/scripts/ci/changelog/templates/changes_misc.md.tera @@ -12,7 +12,7 @@ {%- endif -%} {% endif -%} {% endif -%} -{% endfor %} +{% endfor -%} ### Misc diff --git a/polkadot/scripts/ci/changelog/templates/global_priority.md.tera b/polkadot/scripts/ci/changelog/templates/global_priority.md.tera index 933f878cea..fe3d634f19 100644 --- a/polkadot/scripts/ci/changelog/templates/global_priority.md.tera +++ b/polkadot/scripts/ci/changelog/templates/global_priority.md.tera @@ -18,12 +18,5 @@ {%- set global_prio = substrate_prio -%} {%- endif -%} -{# We show the result #} +{#- We show the result #} {{ m_p::high_priority(p=global_prio, changes=changes) }} - - - -{# todo: show high prio list here #} diff --git a/polkadot/scripts/ci/changelog/templates/high_priority.md.tera b/polkadot/scripts/ci/changelog/templates/high_priority.md.tera index 83b1e5c8b8..117d335efd 100644 --- a/polkadot/scripts/ci/changelog/templates/high_priority.md.tera +++ b/polkadot/scripts/ci/changelog/templates/high_priority.md.tera @@ -21,17 +21,15 @@ {% if p >= 3 %} The changes motivating this priority level are: - {% for pr in changes | sort(attribute="merged_at") -%} {%- 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.B and pr.meta.B.value == 7 %} (RUNTIME) {% endif %} {%- endif -%} {%- endif -%} -{%- endfor %} +{%- endfor -%} {%- else -%} {%- endif -%} diff --git a/polkadot/scripts/ci/changelog/templates/host_functions.md.tera b/polkadot/scripts/ci/changelog/templates/host_functions.md.tera index 46efc8cae9..f47be913b2 100644 --- a/polkadot/scripts/ci/changelog/templates/host_functions.md.tera +++ b/polkadot/scripts/ci/changelog/templates/host_functions.md.tera @@ -20,6 +20,7 @@ {%- 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. diff --git a/polkadot/scripts/ci/changelog/templates/migrations-db.md.tera b/polkadot/scripts/ci/changelog/templates/migrations-db.md.tera index a57a348d64..917073b2f2 100644 --- a/polkadot/scripts/ci/changelog/templates/migrations-db.md.tera +++ b/polkadot/scripts/ci/changelog/templates/migrations-db.md.tera @@ -1,4 +1,4 @@ -{%- import "change.md.tera" as m_c %} +{% import "change.md.tera" as m_c %} {%- set_global db_migration_count = 0 -%} {%- for pr in changes -%} {%- if pr.meta.B and pr.meta.B.value == 0 %} @@ -6,7 +6,7 @@ {%- elif pr.meta.E and pr.meta.E.value == 2 -%} {%- set_global db_migration_count = db_migration_count + 1 -%} {%- endif -%} -{%- endfor -%} +{%- endfor %} ## Database Migrations diff --git a/polkadot/scripts/ci/changelog/templates/migrations-runtime.md.tera b/polkadot/scripts/ci/changelog/templates/migrations-runtime.md.tera index 4a0f749cd6..fda22d30b6 100644 --- a/polkadot/scripts/ci/changelog/templates/migrations-runtime.md.tera +++ b/polkadot/scripts/ci/changelog/templates/migrations-runtime.md.tera @@ -6,7 +6,7 @@ {%- elif pr.meta.E and pr.meta.E.value == 1 -%} {%- set_global runtime_migration_count = runtime_migration_count + 1 -%} {%- endif -%} -{%- endfor -%} +{%- endfor %} ## Runtime Migrations diff --git a/polkadot/scripts/ci/changelog/templates/runtime.md.tera b/polkadot/scripts/ci/changelog/templates/runtime.md.tera index 23b589da91..1610e6e3e3 100644 --- a/polkadot/scripts/ci/changelog/templates/runtime.md.tera +++ b/polkadot/scripts/ci/changelog/templates/runtime.md.tera @@ -16,13 +16,13 @@ ``` -🏋️ Runtime Size: {{ runtime.data.runtimes.compressed.subwasm.size | filesizeformat }} ({{ runtime.data.runtimes.compressed.subwasm.size }} bytes) -🔥 Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version }} -🗜 Compressed: {{ compressed }}: {{ comp_ratio | round(method="ceil", precision=2) }}% -🎁 Metadata version: V{{ runtime.data.runtimes.compressed.subwasm.metadata_version }} -🗳️ system.setCode hash: {{ runtime.data.runtimes.compressed.subwasm.proposal_hash }} -🗳️ authorizeUpgrade hash: {{ runtime.data.runtimes.compressed.subwasm.parachain_authorize_upgrade_hash }} -🗳️ Blake2-256 hash: {{ runtime.data.runtimes.compressed.subwasm.blake2_256 }} -📦 IPFS: {{ runtime.data.runtimes.compressed.subwasm.ipfs_hash }} +🏋️ Runtime Size: {{ runtime.data.runtimes.compressed.subwasm.size | filesizeformat }} ({{ runtime.data.runtimes.compressed.subwasm.size }} bytes) +🔥 Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version }} +🗜 Compressed: {{ compressed }}: {{ comp_ratio | round(method="ceil", precision=2) }}% +🎁 Metadata version: V{{ runtime.data.runtimes.compressed.subwasm.metadata_version }} +🗳️ system.setCode hash: {{ runtime.data.runtimes.compressed.subwasm.proposal_hash }} +🗳️ authorizeUpgrade hash: {{ runtime.data.runtimes.compressed.subwasm.parachain_authorize_upgrade_hash }} +🗳️ Blake2-256 hash: {{ runtime.data.runtimes.compressed.subwasm.blake2_256 }} +📦 IPFS: {{ runtime.data.runtimes.compressed.subwasm.ipfs_hash }} ``` -{%- endmacro runtime %} \ No newline at end of file +{%- endmacro runtime %} diff --git a/polkadot/scripts/ci/changelog/templates/runtimes.md.tera b/polkadot/scripts/ci/changelog/templates/runtimes.md.tera index 600c5f17dc..0847382689 100644 --- a/polkadot/scripts/ci/changelog/templates/runtimes.md.tera +++ b/polkadot/scripts/ci/changelog/templates/runtimes.md.tera @@ -1,6 +1,8 @@ {# This include shows the list and details of the runtimes #} {%- import "runtime.md.tera" as m_r -%} +{# --- #} + ## Runtimes {% set rtm = srtool[0] -%} diff --git a/polkadot/scripts/ci/changelog/templates/template.md.tera b/polkadot/scripts/ci/changelog/templates/template.md.tera index 3a83a77a6a..e04636b4b2 100644 --- a/polkadot/scripts/ci/changelog/templates/template.md.tera +++ b/polkadot/scripts/ci/changelog/templates/template.md.tera @@ -17,7 +17,6 @@ This release contains the changes from `{{ env.REF1 | replace(from="refs/tags/", {# -- Manual free notes section -- #} {% include "_free_notes.md.tera" -%} -{# --------------------------------- #} {# -- Important automatic section -- #} {% include "global_priority.md.tera" -%}