Files
pezkuwi-subxt/polkadot/scripts/changelog/templates/high_priority.md.tera
T
Chevdor 0269532fa8 New changelog scripts (#4491)
* Add templates

* Add folder for local storage of the digests

* Add first draft of the changelog scripts

* Enable Audits in the change template

* Fixes for Polkadot

* Fix templating issue in case there is no high prio change

* Fix Ruby setup

* Remove shell

* Fix chain names

* Fix ENV

* Fix how to get runtime

* Fix runtime_dir

* Fix context location

* Pin changelogerator to a specific version
2022-01-24 09:44:55 +01:00

40 lines
1.1 KiB
Plaintext

{%- import "change.md.tera" as m_c -%}
{# This macro convert a priority level into readable output #}
{%- macro high_priority(p, changes) -%}
{%- if p >= 7 -%}
{%- set prio = "‼️ HIGH" -%}
{%- set text = "This is a **high priority** release and you must upgrade as as soon as possible." -%}
{%- elif p >= 5 -%}
{%- set prio = "❗️ Medium" -%}
{%- set text = "This is a medium priority release and you should upgrade in a timely manner." -%}
{%- else -%}
{%- set prio = "Low" -%}
{%- set text = "This is a low priority release and you may upgrade at your convenience." -%}
{%- endif %}
{%- if prio %}
{{prio}}: {{text}}
{% 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)
{% endif %}
{%- endif -%}
{%- endif -%}
{%- endfor %}
{%- else -%}
<!-- No relevant Priority label as been detected for p={{ p }} -->
{%- endif -%}
{%- endif -%}
{%- endmacro priority -%}