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

split-cl: Use code owners plugin if available.

Change-Id: I2263d8c1bc48ba0f64bcd5e665d8eb6ea451f1cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2693916
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
parent 03918630
......@@ -16,7 +16,6 @@ import tempfile
import gclient_utils
import git_footers
import owners_client
import scm
import git_common as git
......@@ -218,10 +217,6 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
assert refactor_branch_upstream, \
"Branch %s must have an upstream." % refactor_branch
client = owners_client.DepotToolsClient(
root=repository_root,
branch=refactor_branch_upstream)
files_split_by_owners = GetFilesSplitByOwners(files)
num_cls = len(files_split_by_owners)
......@@ -244,8 +239,8 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
# and comment.
directory = directory.replace(os.path.sep, '/')
file_paths = [f for _, f in files]
reviewers = client.SuggestOwners(
file_paths, exclude=[author, owners_client.OwnersClient.EVERYONE])
reviewers = cl.owners_client.SuggestOwners(
file_paths, exclude=[author, cl.owners_client.EVERYONE])
if dry_run:
PrintClInfo(cl_index, num_cls, directory, file_paths, description,
reviewers)
......
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