From 6fa6fe8ea8b960ab4eab90d3682f5248dd815340 Mon Sep 17 00:00:00 2001 From: Innokentii Konstantinov Date: Thu, 24 Nov 2022 12:53:17 +0800 Subject: [PATCH 1/2] Add dot between integration name and alert title in phone call --- .../alerts/incident_appearance/renderers/phone_call_renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/apps/alerts/incident_appearance/renderers/phone_call_renderer.py b/engine/apps/alerts/incident_appearance/renderers/phone_call_renderer.py index b804aaf825..e65d84ebc2 100644 --- a/engine/apps/alerts/incident_appearance/renderers/phone_call_renderer.py +++ b/engine/apps/alerts/incident_appearance/renderers/phone_call_renderer.py @@ -13,7 +13,7 @@ def templater_class(self): class AlertGroupPhoneCallRenderer(AlertGroupBaseRenderer): TEMPLATE = ( "You are invited to check an incident from Grafana OnCall. " - "Alert via {integration_name} with title {title} triggered {alert_count} times" + "Alert via {integration_name}. With title {title} triggered {alert_count} times" ) @property From 8a361253aaf523ee27ff5fd93628c5abdc81a264 Mon Sep 17 00:00:00 2001 From: Innokentii Konstantinov Date: Thu, 24 Nov 2022 13:05:14 +0800 Subject: [PATCH 2/2] Fix tests --- engine/apps/alerts/tests/test_alert_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/apps/alerts/tests/test_alert_group.py b/engine/apps/alerts/tests/test_alert_group.py index 16b3daf32a..90eeb75f76 100644 --- a/engine/apps/alerts/tests/test_alert_group.py +++ b/engine/apps/alerts/tests/test_alert_group.py @@ -40,7 +40,7 @@ def test_render_for_phone_call( expected_verbose_name = ( f"You are invited to check an incident from Grafana OnCall. " - f"Alert via {alert_receive_channel.verbal_name} - Grafana with title TestAlert triggered 1 times" + f"Alert via {alert_receive_channel.verbal_name} - Grafana. With title TestAlert triggered 1 times" ) rendered_text = AlertGroupPhoneCallRenderer(alert_group).render() assert expected_verbose_name in rendered_text