Don't suggest change author as reviewer.
Change-Id: Ie34fc34883b2c86fc134f10ded24b26a631886ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2676835
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index efcf429..0369f16 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1382,7 +1382,7 @@
f for f in files
if status[f] == owners_client.OwnersClient.INSUFFICIENT_REVIEWERS
]
- owners = client.SuggestOwners(missing_files)
+ owners = client.SuggestOwners(missing_files, exclude=[self.GetAuthor()])
if options.add_owners_to == 'TBR':
assert isinstance(options.tbrs, list), options.tbrs
options.tbrs.extend(owners)
@@ -4806,7 +4806,8 @@
if options.batch:
client = owners_client.DepotToolsClient(root, base_branch)
- print('\n'.join(client.SuggestOwners(affected_files)))
+ print('\n'.join(
+ client.SuggestOwners(affected_files, exclude=[cl.GetAuthor()])))
return 0
owner_files = [f for f in affected_files if 'OWNERS' in os.path.basename(f)]