| Index: appengine/chromium_rietveld/codereview/views.py
|
| diff --git a/appengine/chromium_rietveld/codereview/views.py b/appengine/chromium_rietveld/codereview/views.py
|
| index bb9609f1d43798db0197be80c932cca75892fe92..9590013a115e5c3ab842fcf73bff5a30dcebcea9 100644
|
| --- a/appengine/chromium_rietveld/codereview/views.py
|
| +++ b/appengine/chromium_rietveld/codereview/views.py
|
| @@ -3419,22 +3419,25 @@ def publish(request):
|
| if comments:
|
| logging.warn('Publishing %d comments', len(comments))
|
|
|
| + email_to = None
|
| + auto_generated = False
|
| if request.user.email().lower() in (CQ_COMMIT_BOT_EMAIL, CQ_SERVICE_ACCOUNT):
|
| issue.update_cq_status_url_if_any(form.cleaned_data['message'])
|
|
|
| - # Email only the triggerer and the CL owner if it was a CQ dry run request.
|
| - # More details are in http://crbug.com/476883.
|
| - email_to = None
|
| - # Mark CQ dry run messages as autogenerated.
|
| - # More details: http://crbug.com/596249.
|
| - auto_generated = False
|
| - if (request.user.email().lower() in (CQ_COMMIT_BOT_EMAIL, CQ_SERVICE_ACCOUNT)
|
| - and 'dry run' in form.cleaned_data['message'].lower()):
|
| - email_to = [issue.owner.email()]
|
| - auto_generated = True
|
| - if (issue.cq_dry_run_last_triggered_by and
|
| - issue.cq_dry_run_last_triggered_by != issue.owner.email()):
|
| - email_to.append(issue.cq_dry_run_last_triggered_by)
|
| + if utils.is_cq_dry_run_message(form.cleaned_data['message']):
|
| + # Mark CQ dry run messages as autogenerated.
|
| + # More details: http://crbug.com/596249.
|
| + auto_generated = True
|
| + # Email only the triggerer and the CL owner the dry run result,
|
| + # but don't email anyone on the first message.
|
| + # More details are in http://crbug.com/626427.
|
| + if utils.is_cq_dry_run_start_message(form.cleaned_data['message']):
|
| + email_to = []
|
| + else:
|
| + email_to = list(set([issue.owner.email(),
|
| + issue.cq_dry_run_last_triggered_by]))
|
| +
|
| +
|
| msg = make_message(request, issue,
|
| form.cleaned_data['message'],
|
| comments,
|
|
|