-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass additional metadata from alert to event #14301
Conversation
@miq-bot add_label enhancement, providers/containers, wip |
ab31708
to
3464e8c
Compare
46bb8ff
to
916ddff
Compare
@miq-bot remove_label wip |
@gmcculloug can you please review? |
@simon3z @gmcculloug could you please review? |
app/models/ems_event.rb
Outdated
@@ -178,6 +178,8 @@ def parse_event_metadata | |||
event_type == "datawarehouse_alert" ? message : nil, | |||
full_data.try(:[], :severity), | |||
full_data.try(:[], :url), | |||
full_data.try(:[], :ems_ref), | |||
full_data.try(:[], :resolved), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The try
logic is getting ugly. It makes more sense to initialize full_data
at the top of the method if it is nil
then just reference the hash normally.
def parse_event_metadata
full_data ||= {}
[
event_type == "datawarehouse_alert" ? message : nil,
full_data.[:severity],
full_data[:url],
full_data[:ems_ref],
full_data[:resolved]
]
end
916ddff
to
95ebfe0
Compare
Checked commit moolitayer@95ebfe0 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@gmcculloug could you take another look please? |
Code-wise LGTM 👍 @miq-bot assign gmcculloug |
@gmcculloug please take another look |
@moolitayer Please label |
@miq-bot add_label fine/no |
Depends on #14295 [merged]