diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-10 12:09:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-10 12:09:39 +0300 |
commit | c52b81f45762cb7f05a950689dfc6d51b197ea73 (patch) | |
tree | c44830c2fc21d13b81814958c44b09fa8d11c805 /lib/gitlab | |
parent | 187ee320b39af22929d74c5a2d9b0650bf50a09b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-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 |