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

Unified Diff: dashboard/dashboard/issue_tracker_service.py

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dashboard/dashboard/elements/primary-button.html ('k') | dashboard/dashboard/issue_tracker_service_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/issue_tracker_service.py
diff --git a/dashboard/dashboard/issue_tracker_service.py b/dashboard/dashboard/issue_tracker_service.py
index 4c31d0203faf213b93d5e64230620e29a4117403..2b8039c4832456d89c0c74f1baf4ef2f9b9b4a64 100644
--- a/dashboard/dashboard/issue_tracker_service.py
+++ b/dashboard/dashboard/issue_tracker_service.py
@@ -42,7 +42,7 @@ class IssueTrackerService(object):
http=self._http)
def AddBugComment(self, bug_id, comment, status=None, cc_list=None,
- merge_issue=None, labels=None, owner=None):
+ merge_issue=None, labels=None, owner=None, send_email=True):
"""Adds a comment with the bisect results to the given bug.
Args:
@@ -54,6 +54,7 @@ class IssueTrackerService(object):
implies that the status should be "Duplicate".
labels: List of labels for bug.
owner: Owner of the bug.
+ send_email: True to send email to bug cc list, False otherwise.
Returns:
True if successful, False otherwise.
@@ -79,20 +80,21 @@ class IssueTrackerService(object):
updates['owner'] = owner
body['updates'] = updates
- return self._MakeCommentRequest(bug_id, body)
+ return self._MakeCommentRequest(bug_id, body, send_email=send_email)
def List(self, **kwargs):
"""Makes a request to the issue tracker to list bugs."""
request = self._service.issues().list(projectId='chromium', **kwargs)
return self._ExecuteRequest(request)
- def _MakeCommentRequest(self, bug_id, body, retry=True):
+ def _MakeCommentRequest(self, bug_id, body, retry=True, send_email=False):
"""Makes a request to the issue tracker to update a bug.
Args:
bug_id: Bug ID of the issue.
body: Dict of comment parameters.
retry: True to retry on failure, False otherwise.
+ send_email: True to send email to bug cc list, False otherwise.
Returns:
True if successful posted a comment or issue was deleted. False if
@@ -101,7 +103,7 @@ class IssueTrackerService(object):
request = self._service.issues().comments().insert(
projectId='chromium',
issueId=bug_id,
- sendEmail=True,
+ sendEmail=send_email,
body=body)
try:
if self._ExecuteRequest(request, ignore_error=False):
« no previous file with comments | « dashboard/dashboard/elements/primary-button.html ('k') | dashboard/dashboard/issue_tracker_service_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698