don't let 'anyone' be a reviewer
Bug: 1120999
Change-Id: I8190a9d37f8dfcb59d9d51966fc67719592c2c8a
R=sokcevic@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2378453
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
diff --git a/split_cl.py b/split_cl.py
index 0f83895..65dede1 100644
--- a/split_cl.py
+++ b/split_cl.py
@@ -126,7 +126,9 @@
git.run('commit', '-F', tmp_file)
# Upload a CL.
- upload_args = ['-f', '-r', ','.join(reviewers)]
+ upload_args = ['-f']
+ if reviewers:
+ upload_args.extend(['-r', ','.join(reviewers)])
if cq_dry_run:
upload_args.append('--cq-dry-run')
if not comment:
@@ -245,7 +247,7 @@
directory = directory.replace(os.path.sep, '/')
file_paths = [f for _, f in files]
reviewers = owners_database.reviewers_for(file_paths, author)
-
+ reviewers.discard(owners.ANYONE)
if dry_run:
PrintClInfo(cl_index, num_cls, directory, file_paths, description,
reviewers)