mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
feat: include sub groups in report generation
This commit is contained in:
@@ -20,7 +20,7 @@ import * as moment from 'moment';
|
||||
import {join} from 'path';
|
||||
import {cwd} from 'process';
|
||||
import {promisify} from 'util';
|
||||
import {flatten2dArray, getProjects, logger} from '../common';
|
||||
import {flatten2dArray, getProjects, getSubGroups, logger} from '../common';
|
||||
import {BOLD_LABELS, GROUPS, LABEL_WEIGHTS} from '../configuration';
|
||||
|
||||
const asyncWriteFile = promisify(writeFile);
|
||||
@@ -295,7 +295,13 @@ export async function getMergeRequestsForProjects(api: Api,
|
||||
export async function report(api: Api, label: string) {
|
||||
const templates = compileTemplates();
|
||||
|
||||
const projects = await getProjects(api, GROUPS);
|
||||
const groupIds: number[] = [];
|
||||
groupIds.push.apply(groupIds, GROUPS);
|
||||
groupIds.push.apply(groupIds, (await getSubGroups(api, GROUPS)).map((group) => group.id));
|
||||
|
||||
logger.log(`Getting data for ${groupIds.length} group(s).`);
|
||||
|
||||
const projects = await getProjects(api, groupIds);
|
||||
const issues = await getIssues(api, label);
|
||||
|
||||
const issuesGroupedByAssignee = groupIssuesByAssignee(issues);
|
||||
|
||||
Reference in New Issue
Block a user