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

Unified Diff: infra/libs/gerrit_api/gerrit_api.py

Issue 2180173003: gerrit_api: add tag to set_review method. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | infra/libs/gerrit_api/test/gerrit_api_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/libs/gerrit_api/gerrit_api.py
diff --git a/infra/libs/gerrit_api/gerrit_api.py b/infra/libs/gerrit_api/gerrit_api.py
index 911a0603c1515b17b0b636409a9413deb9a9ad4b..1f29d69851b21980ebd3394645d144a9799b06ca 100644
--- a/infra/libs/gerrit_api/gerrit_api.py
+++ b/infra/libs/gerrit_api/gerrit_api.py
@@ -429,7 +429,7 @@ class Gerrit(object):
@_not_read_only
def set_review(self, change_id, revision_id, message=None, labels=None,
- notify=NOTIFY_NONE, max_message=300):
+ notify=NOTIFY_NONE, max_message=300, tag=None):
"""Uses the Set Review endpoint of the Gerrit API to add messages and/or set
labels for a patchset.
Documentation:
@@ -441,6 +441,8 @@ class Gerrit(object):
message: (str) The message to add to the patchset.
labels: (dict) The dictionary which maps label names to their new value.
notify: (str) Who should get a notification.
+ tag: (str) Apply this tag to the review comment message and labels(votes):
Michael Achenbach 2016/07/26 13:59:44 nit: space before (
tandrii(chromium) 2016/07/26 14:06:35 fix in follow up CL https://codereview.chromium.or
+ https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-input
"""
if message:
tail = u'\n(message too large)'
@@ -449,7 +451,7 @@ class Gerrit(object):
logging.info('change_id: %s; comment: %s' % (change_id, message.strip()))
payload = {}
for var, attr in [(message, 'message'), (notify, 'notify'),
- (labels, 'labels')]:
+ (labels, 'labels'), (tag, 'tag')]:
if var is not None:
payload[attr] = var
code, body = self._request(
« no previous file with comments | « no previous file | infra/libs/gerrit_api/test/gerrit_api_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698