diff --git a/src/tasks/tidy.ts b/src/tasks/tidy.ts index b55308dd..4d338e72 100644 --- a/src/tasks/tidy.ts +++ b/src/tasks/tidy.ts @@ -341,14 +341,18 @@ export async function tidyIssuesWithoutAssignee(api: Api): Promise { * @param api GitLab API instance to use for the requests */ export async function tidy(api: Api) { - const projects = await getProjects(api, GROUPS); + // get first level sub groups + const groups = GROUPS.slice(); + groups.push.apply(groups, (await api.getSubGroupsForGroup(groups[0])).map((group) => group.id)); + + // get projects of groups + const projects = await getProjects(api, groups); await Promise.all([ tidyLabels(api, projects), tidyMilestones(api, projects), tidyProtectedBranches(api, projects), tidyProtectedTags(api, projects), - tidySubGroupMembers(api), ]); await tidyOpenIssuesWithoutMeetingLabel(api);