Merge changes Id88e30f2,I9133556e
* changes:
Document that changing allowedEmails may cause issues in code owner configs
Extract FAQs from setup guide to own documentation page
diff --git a/ui/code-owners-service.js b/ui/code-owners-service.js
index 8bb14d1..cf9f1f5 100644
--- a/ui/code-owners-service.js
+++ b/ui/code-owners-service.js
@@ -277,7 +277,11 @@
try {
const owners = await this.codeOwnerApi.listOwnersForPath(changeId,
filePath);
- this._fetchedOwners.get(filePath).owners = new Set(owners);
+ // In the upcoming backend changes, the api will return an object instead
+ // of array. While this transition is in progress, the frontend supports
+ // both API - the old one and the new one.
+ this._fetchedOwners.get(filePath).owners = new Set(
+ owners instanceof Array ? owners : owners.code_owners);
} catch (e) {
this._fetchedOwners.get(filePath).error = e;
}