No bug: [taskgraph] Simplify release_notifications transform slightly; r=aki

Differential Revision: https://phabricator.services.mozilla.com/D49770

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Prince 2019-10-18 16:38:19 +00:00
Родитель 4dcaa130ee
Коммит 51f902d844
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -22,7 +22,7 @@ def add_notifications(config, jobs):
for job in jobs:
label = '{}-{}'.format(config.kind, job['name'])
notifications = job.get('notifications')
notifications = job.pop('notifications')
if notifications:
resolve_keyed_by(notifications, 'emails', label, project=config.params['project'])
emails = notifications['emails']
@ -34,8 +34,6 @@ def add_notifications(config, jobs):
subject = notifications['subject'].format(**format_kwargs)
message = notifications['message'].format(**format_kwargs)
emails = [email.format(**format_kwargs) for email in emails]
# Don't need this any more
del job['notifications']
# We only send mail on success to avoid messages like 'blah is in the
# candidates dir' when cancelling graphs, dummy job failure, etc