From e5d990b5fd7b3f4f2a986b9c0440155ffa254e82 Mon Sep 17 00:00:00 2001 From: Chevdor Date: Fri, 22 Apr 2022 15:52:24 +0200 Subject: [PATCH] Fix priority thresholds (#1203) --- cumulus/scripts/ci/changelog/templates/change.md.tera | 4 ++-- .../scripts/ci/changelog/templates/high_priority.md.tera | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cumulus/scripts/ci/changelog/templates/change.md.tera b/cumulus/scripts/ci/changelog/templates/change.md.tera index b02b1d513c..cb40496266 100644 --- a/cumulus/scripts/ci/changelog/templates/change.md.tera +++ b/cumulus/scripts/ci/changelog/templates/change.md.tera @@ -3,9 +3,9 @@ {%- if c.meta.C and c.meta.C.value >= 7 -%} {%- set prio = " ‼️ HIGH" -%} -{%- elif c.meta.C and c.meta.C.value >= 5 -%} -{%- set prio = " ❗️ Medium" -%} {%- elif c.meta.C and c.meta.C.value >= 3 -%} +{%- set prio = " ❗️ Medium" -%} +{%- elif c.meta.C and c.meta.C.value < 3 -%} {%- set prio = " Low" -%} {%- else -%} {%- set prio = "" -%} diff --git a/cumulus/scripts/ci/changelog/templates/high_priority.md.tera b/cumulus/scripts/ci/changelog/templates/high_priority.md.tera index 501b75bdce..e23bbae942 100644 --- a/cumulus/scripts/ci/changelog/templates/high_priority.md.tera +++ b/cumulus/scripts/ci/changelog/templates/high_priority.md.tera @@ -22,14 +22,16 @@ {%- if p >= 7 or host_fn_count > 0 -%} {%- set prio = "‼️ HIGH" -%} {%- set text = "This is a **high priority** release and you must upgrade as as soon as possible." -%} -{%- elif p >= 5 -%} +{%- elif p >= 3 -%} {%- set prio = "❗️ Medium" -%} {%- set text = "This is a medium priority release and you should upgrade in a timely manner." -%} -{%- elif p >= 3 -%} +{%- else -%} {%- set prio = "Low" -%} {%- set text = "This is a low priority release and you may upgrade at your convenience." -%} {%- endif -%} + + {%- if prio -%} {{prio}}: {{text}} {%- else -%}