Fix templates (#2204) (#2212)

* More fixes

* Add API section and various fixes
This commit is contained in:
Chevdor
2023-02-17 17:19:59 +01:00
committed by GitHub
parent 51f700fdbc
commit 0befc42065
14 changed files with 68 additions and 35 deletions
@@ -1,11 +1,11 @@
{# This macro shows ONE change #}
{%- macro change(c, cml="[C]", dot="[P]", sub="[S]") -%}
{%- if c.meta.C and c.meta.C.value >= 5 -%}
{%- if c.meta.C and c.meta.C.agg.max >= 5 -%}
{%- set prio = " ‼️ HIGH" -%}
{%- elif c.meta.C and c.meta.C.value >= 3 -%}
{%- elif c.meta.C and c.meta.C.agg.max >= 3 -%}
{%- set prio = " ❗️ Medium" -%}
{%- elif c.meta.C and c.meta.C.value < 3 -%}
{%- elif c.meta.C and c.meta.C.agg.max < 3 -%}
{%- set prio = " Low" -%}
{%- else -%}
{%- set prio = "" -%}
@@ -13,13 +13,13 @@
{%- set audit = "" -%}
{#
{%- if c.meta.D and c.meta.D.value == 1 -%}
{%- if c.meta.D and c.meta.D.D1 -%}
{%- set audit = "✅ audited " -%}
{%- elif c.meta.D and c.meta.D.value == 2 -%}
{%- elif c.meta.D and c.meta.D.D2 -%}
{%- set audit = "✅ trivial " -%}
{%- elif c.meta.D and c.meta.D.value == 3 -%}
{%- elif c.meta.D and c.meta.D.D3 -%}
{%- set audit = "✅ trivial " -%}
{%- elif c.meta.D and c.meta.D.value == 5 -%}
{%- elif c.meta.D and c.meta.D.D5 -%}
{%- set audit = "⏳ pending non-critical audit " -%}
{%- else -%}
{%- set audit = "" -%}
@@ -35,7 +35,7 @@
{%- set repo = " " -%}
{%- endif -%}
{# #}
{%- if c.meta.T and c.meta.T.value == 6 -%}
{%- if c.meta.T and c.meta.T.T6 -%}
{%- set xcm = " [✉️ XCM]" -%}
{%- else -%}
{%- set xcm = "" -%}
@@ -16,4 +16,6 @@
{% endif %}
{% include "changes_api.md.tera" %}
{% include "changes_misc.md.tera" %}
@@ -0,0 +1,19 @@
{%- import "change.md.tera" as m_c -%}
### API
{#- The changes are sorted by merge date -#}
{% for pr in changes | sort(attribute="merged_at") -%}
{%- if pr.meta.B -%}
{%- if pr.meta.B.B0 -%}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.B.B1 and pr.meta.T.T2 and not pr.title is containing("ompanion") %}
- {{ m_c::change(c=pr) }}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endfor %}
@@ -5,11 +5,11 @@
{%- for pr in changes | sort(attribute="merged_at") %}
{%- if pr.meta.B %}
{%- if pr.meta.B.value == 0 %}
{%- if pr.meta.B.B0 %}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.B.value == 5 and not pr.title is containing("ompanion") %}
{%- if pr.meta.B.B1 and pr.meta.T and pr.meta.T.T0 and not pr.title is containing("ompanion") %}
- {{ m_c::change(c=pr) }}
{%- endif -%}
{% endif -%}
@@ -4,10 +4,10 @@
{#- First pass to count #}
{%- for pr in changes -%}
{%- if pr.meta.B %}
{%- if pr.meta.B.value == 0 -%}
{%- if pr.meta.B.B0 -%}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.B and pr.meta.B.value != 5 or pr.meta.C or not pr.meta.B %}
{%- if pr.meta.T and pr.meta.T.agg.max > 2 %}
{%- set_global misc_count = misc_count + 1 -%}
{%- endif -%}
{% endif -%}
@@ -24,10 +24,10 @@ There are other misc. changes. You can expand the list below to view them all.
{#- The changes are sorted by merge date #}
{%- for pr in changes | sort(attribute="merged_at") %}
{%- if pr.meta.B and not pr.title is containing("ompanion") %}
{%- if pr.meta.B.value == 0 %}
{%- if pr.meta.B.B0 %}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.B and pr.meta.B.value != 5 or pr.meta.C or not pr.meta.B %}
{%- if pr.meta.T and pr.meta.T.agg.max > 2 %}
- {{ m_c::change(c=pr) }}
{%- endif -%}
{% endif -%}
@@ -5,12 +5,12 @@
{#- The changes are sorted by merge date -#}
{% for pr in changes | sort(attribute="merged_at") -%}
{%- if pr.meta.B and pr.meta.X -%}
{%- if pr.meta.B.value == 0 -%}
{%- if pr.meta.B -%}
{%- if pr.meta.B.B0 -%}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.B.value == 1 and pr.meta.X.value == 1 and not pr.title is containing("ompanion") %}
{%- if pr.meta.B.B1 and pr.meta.T.T1 and not pr.title is containing("ompanion") %}
- {{ m_c::change(c=pr) }}
{%- endif -%}
{%- endif -%}
+1 -1
View File
@@ -1,4 +1,4 @@
{%- set to_ignore = changes | filter(attribute="meta.B.value", value=0) %}
{%- set to_ignore = changes | filter(attribute="meta.B.B0") %}
<!--
## Debug
@@ -10,10 +10,10 @@
{# We loop first to count the number of host functions but we do not display anything yet #}
{%- for pr in changes -%}
{%- if pr.meta.B and pr.meta.B.value == 0 -%}
{%- if pr.meta.B and pr.meta.B.B0 -%}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.E and pr.meta.E.value == 4 -%}
{%- if pr.meta.E and pr.meta.E.E4 -%}
{%- set_global host_fn_count = host_fn_count + 1 -%}
{%- endif -%}
{%- endif -%}
@@ -31,8 +31,7 @@
{%- endif -%}
<!-- detected max prio is: {{p}} -->
{%- if prio -%}
{% if prio -%}
{{prio}}: {{text}}
{%- else -%}
<!-- No relevant Priority label as been detected -->
@@ -43,9 +42,9 @@
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 %}
{%- if pr.meta.C.agg.max >= p %}
- {{ m_c::change(c=pr) }}
{%- if pr.meta.B and pr.meta.X and pr.meta.B.value == 1 and pr.meta.X.value == 1 %}
{%- if pr.meta.B and pr.meta.B.B1 and pr.meta.T and pr.meta.T.T1 %}
(RUNTIME)
{% endif %}
@@ -4,10 +4,10 @@
{# We loop first to count the number of host functions but we do not display anything yet #}
{%- for pr in changes -%}
{%- if pr.meta.B and pr.meta.B.value == 0 -%}
{%- if pr.meta.B and pr.meta.B.B0 -%}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.E and pr.meta.E.value == 4 -%}
{%- if pr.meta.E and pr.meta.E.E4 -%}
{%- set_global host_fn_count = host_fn_count + 1 -%}
{% endif -%}
{%- endif -%}
@@ -26,10 +26,10 @@
{% for pr in changes | sort(attribute="merged_at") -%}
{%- if pr.meta.B and pr.meta.B.value == 0 -%}
{%- if pr.meta.B and pr.meta.B.B0 -%}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.E and pr.meta.E.value == 4 -%}
{%- if pr.meta.E and pr.meta.E.E4 -%}
- {{ m_c::change(c=pr) }}
{% endif -%}
{% endif -%}
@@ -5,10 +5,10 @@
{% for pr in changes | sort(attribute="merged_at") -%}
{%- if pr.meta.B and pr.meta.B.value == 0 %}
{%- if pr.meta.B and pr.meta.B.B0 %}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.E and pr.meta.E.value == 2 -%}
{%- if pr.meta.E and pr.meta.E.E2 -%}
{%- set_global db_migration_count = db_migration_count + 1 -%}
- {{ m_c::change(c=pr) }}
{% endif -%}
@@ -4,10 +4,10 @@
{% for pr in changes | sort(attribute="merged_at") -%}
{%- if pr.meta.B and pr.meta.B.value == 0 %}
{%- if pr.meta.B and pr.meta.B.B0 %}
{#- We skip silent ones -#}
{%- else -%}
{%- if pr.meta.E and pr.meta.E.value == 1 -%}
{%- if pr.meta.E and pr.meta.E.E1 -%}
- {{ m_c::change(c=pr) }}
{% endif -%}
{% endif -%}