From c52b81f45762cb7f05a950689dfc6d51b197ea73 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 10 Apr 2020 09:09:39 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/gitlab/alerting/alert.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/gitlab/alerting/alert.rb b/lib/gitlab/alerting/alert.rb index 531307b93d4..f6f52e392c6 100644 --- a/lib/gitlab/alerting/alert.rb +++ b/lib/gitlab/alerting/alert.rb @@ -69,6 +69,12 @@ module Gitlab end end + def y_label + strong_memoize(:y_label) do + parse_y_label_from_payload || title + end + end + def alert_markdown strong_memoize(:alert_markdown) do parse_alert_markdown_from_payload @@ -162,6 +168,10 @@ module Gitlab def parse_alert_markdown_from_payload payload&.dig('annotations', 'gitlab_incident_markdown') end + + def parse_y_label_from_payload + payload&.dig('annotations', 'gitlab_y_label') + end end end end -- cgit v1.2.1