From 624a1b2c088ff271e9b5fb6cd07688e2265f43a7 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 13 Sep 2021 17:03:57 +0200 Subject: [PATCH] grafana formatter: smaller titles --- matrix_webhook/formatters.py | 2 +- tests/test_grafana.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_webhook/formatters.py b/matrix_webhook/formatters.py index 2d52788..c59249e 100644 --- a/matrix_webhook/formatters.py +++ b/matrix_webhook/formatters.py @@ -5,7 +5,7 @@ def grafana(data, headers): """Pretty-print a grafana notification.""" text = "" if "title" in data: - text = "### " + data["title"] + "\n" + text = "#### " + data["title"] + "\n" if "message" in data: text = text + data["message"] + "\n\n" if "evalMatches" in data: diff --git a/tests/test_grafana.py b/tests/test_grafana.py index 6cd04cf..5c7cbd5 100644 --- a/tests/test_grafana.py +++ b/tests/test_grafana.py @@ -42,5 +42,5 @@ class GrafanaFormatterTest(unittest.IsolatedAsyncioTestCase): self.assertEqual(message.sender, FULL_ID) self.assertEqual( message.body, - "### [Alerting] Panel Title alert\nNotification Message\n\n* Count: 1\n", + "#### [Alerting] Panel Title alert\nNotification Message\n\n* Count: 1\n", )