Commit 88f712e0 authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

code-owners: Use Gerrit code-owners if available

Problems interpreting OWNERS files have been fixed upstream.

Bug: 1183447
Change-Id: Ifd065d87b4244fc3ce2f27291b603acfedbb5d39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2753447
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarEdwin Kempin <ekempin@google.com>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent e7dc8c3a
......@@ -201,6 +201,6 @@ def GetCodeOwnersClient(root, upstream, host, project, branch):
Defaults to GerritClient, and falls back to DepotToolsClient if code-owners
plugin is not available."""
# TODO(crbug.com/1183447): Use code-owners plugin if available on host once
# code-owners plugin issues have been fixed.
if gerrit_util.IsCodeOwnersEnabled(host):
return GerritClient(host, project, branch)
return DepotToolsClient(root, upstream)
......@@ -296,9 +296,10 @@ class GetCodeOwnersClientTest(unittest.TestCase):
self.addCleanup(mock.patch.stopall)
def testGetCodeOwnersClient_GerritClient(self):
# TODO(crbug.com/1183447): Check that code-owners is used if available once
# code-owners plugin issues have been fixed.
pass
gerrit_util.IsCodeOwnersEnabled.return_value = True
self.assertIsInstance(
owners_client.GetCodeOwnersClient('', '', 'host', 'project', 'branch'),
owners_client.GerritClient)
def testGetCodeOwnersClient_DepotToolsClient(self):
gerrit_util.IsCodeOwnersEnabled.return_value = False
......
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