Commit 0f790421 authored by Gavin Mak's avatar Gavin Mak Committed by LUCI CQ

Update ListOwners for GerritClient in owners_client

The REST endpoint used by GerritClient.ListOwners needs to be updated as
of https://gerrit-review.googlesource.com/c/plugins/code-owners/+/293806

Change-Id: I5c142f16443b157c9d8edfa5bcf418cbedd2b193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2658609Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
parent 037b0821
......@@ -203,4 +203,4 @@ class GerritClient(OwnersClient):
# random.
data = gerrit_util.GetOwnersForFile(
self._host, self._project, self._branch, path)
return [d['account']['email'] for d in data]
return [d['account']['email'] for d in data['code_owners']]
......@@ -27,23 +27,25 @@ emily = 'emily@example.com'
def _get_owners():
return [
{
"account": {
"email": 'approver@example.com'
}
},
{
"account": {
"email": 'reviewer@example.com'
return {
"code_owners": [
{
"account": {
"email": 'approver@example.com'
}
},
},
{
"account": {
"email": 'missing@example.com'
{
"account": {
"email": 'reviewer@example.com'
},
},
}
]
{
"account": {
"email": 'missing@example.com'
},
}
]
}
......
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