aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/git_utils.py
diff options
context:
space:
mode:
authorGravatar Ravi Mistry <rmistry@google.com>2017-12-07 14:46:40 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-07 20:11:00 +0000
commita4ceaa1e5a555d27bfea40811c209640fa248392 (patch)
treef003d74d96ada0a6008c855657750636cdba341d /infra/bots/git_utils.py
parent15f46c3c1f7dd52283a9e451d0470c38a8f56f5f (diff)
[Infra] Add ability to specify a cc_list to git_utils.py
Bug: skia:7310 Change-Id: I8ef505025e2cf0b7859e54e85293efed16704398 Reviewed-on: https://skia-review.googlesource.com/82200 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/git_utils.py')
-rw-r--r--infra/bots/git_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/infra/bots/git_utils.py b/infra/bots/git_utils.py
index 5e1d0c9537..8e623f7887 100644
--- a/infra/bots/git_utils.py
+++ b/infra/bots/git_utils.py
@@ -47,13 +47,14 @@ class GitBranch(object):
created temporary branch upon exit.
"""
def __init__(self, branch_name, commit_msg, upload=True, commit_queue=False,
- delete_when_finished=True):
+ delete_when_finished=True, cc_list=None):
self._branch_name = branch_name
self._commit_msg = commit_msg
self._upload = upload
self._commit_queue = commit_queue
self._patch_set = 0
self._delete_when_finished = delete_when_finished
+ self._cc_list = cc_list
def __enter__(self):
subprocess.check_call(['git', 'reset', '--hard', 'HEAD'])
@@ -76,6 +77,8 @@ class GitBranch(object):
upload_cmd.append('--use-commit-queue')
# Need the --send-mail flag to publish the CL and remove WIP bit.
upload_cmd.append('--send-mail')
+ if self._cc_list:
+ upload_cmd.extend(['--cc=%s' % ','.join(self._cc_list)])
subprocess.check_call(upload_cmd)
output = subprocess.check_output(['git', 'cl', 'issue']).rstrip()
return re.match('^Issue number: (?P<issue>\d+) \((?P<issue_url>.+)\)$',