Commit e342fb16 authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

Don't suggest change author as reviewer.

Change-Id: Ie34fc34883b2c86fc134f10ded24b26a631886ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2676835Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 680a6c37
......@@ -1382,7 +1382,7 @@ class Changelist(object):
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 @@ def CMDowners(parser, args):
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)]
......
......@@ -1182,7 +1182,8 @@ def CheckOwners(
if tbr and affects_owners:
output_list.append(output_fn('TBR for OWNERS files are ignored.'))
if not input_api.is_committing:
suggested_owners = input_api.owners_client.SuggestOwners(missing_files)
suggested_owners = input_api.owners_client.SuggestOwners(
missing_files, exclude=[owner_email])
output_list.append(output_fn('Suggested OWNERS: ' +
'(Use "git-cl owners" to interactively select owners.)\n %s' %
('\n '.join(suggested_owners))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment