Welcome to mirror list, hosted at ThFree Co, Russian Federation.

boards_util.js « boards « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 384a386d69c95bf597b8cfd3eefdd8dd1131dde4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import ListIssue from 'ee_else_ce/boards/models/issue';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';

export function getMilestone() {
  return null;
}

export function formatListIssues(listIssues) {
  return listIssues.nodes.reduce((map, list) => {
    return {
      ...map,
      [list.id]: list.issues.nodes.map(
        i =>
          new ListIssue({
            ...i,
            id: getIdFromGraphQLId(i.id),
            labels: i.labels?.nodes || [],
            assignees: i.assignees?.nodes || [],
          }),
      ),
    };
  }, {});
}

export default {
  getMilestone,
  formatListIssues,
};