diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/alerting/alert.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 |