This repository has been archived by the owner on Dec 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: With this diff, changes emails are structured as follows: Builds summary. for each build in build_collection: for each job in build: Failing tests. Relevant logs. Test Plan: Unit tests, render builds exported from prod. locally, test emails in real email clients. Reviewers: cf, cramer, vishal Reviewed By: vishal Subscribers: jukka, dfb-reviews, ar, alexallain, changesbot, reviews-dfbgrowth Differential Revision: https://tails.corp.dropbox.com/D80946
- Loading branch information
Showing
14 changed files
with
866 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from flask import render_template | ||
from flask.views import MethodView | ||
|
||
from changes.models.build import Build | ||
from changes.listeners.mail import MailNotificationHandler | ||
|
||
|
||
class BuildResultMailView(MethodView): | ||
def get(self, build_id): | ||
build = Build.query.get(build_id) | ||
assert build, 'There is no build for {}'.format(build_id) | ||
|
||
builds = list( | ||
Build.query.filter(Build.collection_id == build.collection_id)) | ||
notification_handler = MailNotificationHandler() | ||
context = notification_handler.get_collection_context(builds) | ||
msg = notification_handler.get_msg(context) | ||
return render_template( | ||
'debug/email.html', | ||
recipients=msg.recipients, | ||
subject=msg.subject, | ||
text_content=msg.body, | ||
html_content=msg.html, | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.