Also list members of subgroups of the owner group

The github plugins define owners in a subgroup of the owner group hence
we need to also list members of these subgroups to find all plugin
maintainers.

Change-Id: If1d6c91bb5e973b781ad409210ea017bae340421
diff --git a/tools/plugins.py b/tools/plugins.py
index c025f11..16c0998 100644
--- a/tools/plugins.py
+++ b/tools/plugins.py
@@ -307,7 +307,20 @@
     def _get_owner_names(self, parent, owner_group_ids):
         accounts = set()
         external_groups = set()
+        all_owner_group_ids = set(owner_group_ids)
+        # add subgroups if any
         for id in owner_group_ids:
+            if id == CORE_MAINTAINERS_ID:
+                continue
+            else:
+                try:
+                    subgroups = self.api.get(f"/groups/{id}/groups")
+                    for s in subgroups:
+                        all_owner_group_ids.add(s.get("id"))
+                except requests.HTTPError:
+                    # can't read group
+                    pass
+        for id in all_owner_group_ids:
             try:
                 if id == CORE_MAINTAINERS_ID:
                     external_groups.add(CORE_MAINTAINERS_NAME)