summaryrefslogtreecommitdiff
path: root/app/mailers/emails/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/emails/projects.rb')
-rw-r--r--app/mailers/emails/projects.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 06ba16f9724..14c724b5b91 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -59,6 +59,7 @@ module Emails
def prometheus_alert_fired_email(project, user, alert)
@project = project
@alert = alert.present
+ @incident = alert.issue
add_project_headers
add_alert_headers
@@ -80,11 +81,10 @@ module Emails
end
def add_incident_headers
- incident = @alert.issue
- return unless incident
+ return unless @incident
- headers['X-GitLab-Incident-ID'] = incident.id
- headers['X-GitLab-Incident-IID'] = incident.iid
+ headers['X-GitLab-Incident-ID'] = @incident.id
+ headers['X-GitLab-Incident-IID'] = @incident.iid
end
end
end