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>
changes/35/2676835/2
Edward Lesmes 4 years ago committed by LUCI CQ
parent 680a6c37a0
commit e342fb16f9

@ -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))))

Loading…
Cancel
Save