Include ref info in smtp reporter subjects

With the move towards reporting zuul's build dashboard pages we lose
info like the ref/branch that a job ran against when reporting with smtp
(because that info is no longer in the log url). Add the ref info to the
subject lines by default to help make that a little better for our
users.

Change-Id: I9671deb6e1de91832f3830587f90edfe46f06f33
This commit is contained in:
Clark Boylan
2019-08-19 12:32:40 -07:00
parent 8c1f4e9d6b
commit a219eed5e8
+2 -1
View File
@@ -42,7 +42,8 @@ class SMTPReporter(BaseReporter):
subject = self.config['subject'].format(
change=item.change)
else:
subject = "Report for change %s" % item.change
subject = "Report for change {change} against {ref}".format(
change=item.change, ref=item.change.ref)
self.connection.sendMail(subject, message, from_email, to_email,
zuul_event_id=item.event)