Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add a new template to show the list of host functions #7158

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-99_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: 'Ledger <> Polkadot Coordination'
room: '!EoIhaKfGPmFOBrNSHT:web3.foundation'
pre-release: true

runs-on: ubuntu-latest
steps:
- name: Send Matrix message to ${{ matrix.channel.name }}
Expand Down
12 changes: 12 additions & 0 deletions scripts/ci/changelog/templates/host_functions-list.md.tera
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{%- import "change.md.tera" as m_c -%}

{% 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.E3 -%}
- {{ m_c::change(c=pr) }}
{% endif -%}
{% endif -%}
{%- endfor -%}
12 changes: 7 additions & 5 deletions scripts/ci/changelog/templates/host_functions.md.tera
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- import "change.md.tera" as m_c -%}

{%- set_global host_fn_count = 0 -%}
{%- set_global upgrade_first = 0 -%}

Expand All @@ -10,20 +11,19 @@
{%- 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 -%}
{% 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.
⚠️ 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 %}
Expand All @@ -36,7 +36,9 @@
ℹ️ This release does not contain any new host functions.
{% elif host_fn_count == 1 -%}
{# ---- #}
ℹ️ The runtimes in this release contain one new **host function**.
ℹ️ The runtimes in this release contain one new **host function**:
{% include "host_functions-list.md.tera" -%}
{%- else -%}
ℹ️ The runtimes in this release contain {{ host_fn_count }} new **host function{{ host_fn_count | pluralize }}**.
ℹ️ The runtimes in this release contain {{ host_fn_count }} new **host function{{ host_fn_count | pluralize }}**:
{% include "host_functions-list.md.tera" -%}
{%- endif %}