Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: appengine/chromium_rietveld/codereview/views.py

Issue 2123093009: Rietveld: add CQ status URL instead of comment. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2008 Google Inc. 1 # Copyright 2008 Google Inc.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3411 if not form.cleaned_data.get('message_only', False): 3411 if not form.cleaned_data.get('message_only', False):
3412 tbd, comments = _get_draft_comments(request, issue) 3412 tbd, comments = _get_draft_comments(request, issue)
3413 else: 3413 else:
3414 tbd = [] 3414 tbd = []
3415 comments = [] 3415 comments = []
3416 issue.update_comment_count(len(comments)) 3416 issue.update_comment_count(len(comments))
3417 tbd.append(issue) 3417 tbd.append(issue)
3418 3418
3419 if comments: 3419 if comments:
3420 logging.warn('Publishing %d comments', len(comments)) 3420 logging.warn('Publishing %d comments', len(comments))
3421
3422 if request.user.email().lower() in (CQ_COMMIT_BOT_EMAIL, CQ_SERVICE_ACCOUNT):
3423 issue.update_cq_status_url_if_any(form.cleaned_data['message'])
3424
3421 # Email only the triggerer and the CL owner if it was a CQ dry run request. 3425 # Email only the triggerer and the CL owner if it was a CQ dry run request.
3422 # More details are in http://crbug.com/476883. 3426 # More details are in http://crbug.com/476883.
3423 email_to = None 3427 email_to = None
3424 # Mark CQ dry run messages as autogenerated. 3428 # Mark CQ dry run messages as autogenerated.
3425 # More details: http://crbug.com/596249. 3429 # More details: http://crbug.com/596249.
3426 auto_generated = False 3430 auto_generated = False
3427 if (request.user.email().lower() in (CQ_COMMIT_BOT_EMAIL, CQ_SERVICE_ACCOUNT) 3431 if (request.user.email().lower() in (CQ_COMMIT_BOT_EMAIL, CQ_SERVICE_ACCOUNT)
3428 and 'dry run' in form.cleaned_data['message'].lower()): 3432 and 'dry run' in form.cleaned_data['message'].lower()):
3429 email_to = [issue.owner.email()] 3433 email_to = [issue.owner.email()]
3430 auto_generated = True 3434 auto_generated = True
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
5572 return HttpResponseNotFound() 5576 return HttpResponseNotFound()
5573 tops = [] 5577 tops = []
5574 shame = [] 5578 shame = []
5575 for i in data: 5579 for i in data:
5576 if i.score == models.AccountStatsBase.NULL_SCORE: 5580 if i.score == models.AccountStatsBase.NULL_SCORE:
5577 shame.append(i) 5581 shame.append(i)
5578 else: 5582 else:
5579 tops.append(i) 5583 tops.append(i)
5580 return respond( 5584 return respond(
5581 request, 'leaderboard.html', {'tops': tops, 'shame': shame, 'when': when}) 5585 request, 'leaderboard.html', {'tops': tops, 'shame': shame, 'when': when})
OLDNEW
« no previous file with comments | « appengine/chromium_rietveld/codereview/utils.py ('k') | appengine/chromium_rietveld/templates/patchset.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698