From 6b43e283d448ce8cc30ec053b7cae3dc234d5321 Mon Sep 17 00:00:00 2001 From: michaelact <86778470+michaelact@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:48:34 +0700 Subject: [PATCH] feat: add 'summary' to be overriden from rules.yml --- dist/template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/template.yml b/dist/template.yml index 0dd9684..cdde4ea 100644 --- a/dist/template.yml +++ b/dist/template.yml @@ -11,6 +11,6 @@ groups: labels: severity: {{ rule.severity }} annotations: - summary: {{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %}) + summary: {% if rule.summary %}{{ rule.summary }}{% else %}{{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %}){% endif %} description: "{{ rule.description | replace: '"', '\"' }}\n VALUE = {% raw %}{{ $value }}{% endraw %}\n LABELS = {% raw %}{{ $labels }}{% endraw %}" {% endfor %} \ No newline at end of file