diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/mailers/emails/projects.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/mailers/emails/projects.rb')
-rw-r--r-- | app/mailers/emails/projects.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index 17ef8b41e79..a4b7b140169 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -56,12 +56,9 @@ module Emails subject: @message.subject) end - def prometheus_alert_fired_email(project_id, user_id, alert_attributes) - @project = ::Project.find(project_id) - user = ::User.find(user_id) - - @alert = AlertManagement::Alert.new(alert_attributes.with_indifferent_access).present - return unless @alert.parsed_payload.has_required_attributes? + def prometheus_alert_fired_email(project, user, alert) + @project = project + @alert = alert.present subject_text = "Alert: #{@alert.email_title}" mail(to: user.notification_email_for(@project.group), subject: subject(subject_text)) |