blob: 652f8a8a107c48864c297f7bd98c71c501c209f5 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
|
import ListIssue from 'ee_else_ce/boards/models/issue';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
export function getMilestone() {
return null;
}
export function formatListIssues(listIssues) {
const issues = {};
const listData = listIssues.nodes.reduce((map, list) => {
return {
...map,
[list.id]: list.issues.nodes.map(i => {
const id = getIdFromGraphQLId(i.id);
const listIssue = new ListIssue({
...i,
id,
labels: i.labels?.nodes || [],
assignees: i.assignees?.nodes || [],
});
issues[id] = listIssue;
return id;
}),
};
}, {});
return { listData, issues };
}
export function fullBoardId(boardId) {
return `gid://gitlab/Board/${boardId}`;
}
export default {
getMilestone,
formatListIssues,
};
|