-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathgithub-issue.model.ts
66 lines (57 loc) · 1.66 KB
/
github-issue.model.ts
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import {
GithubOriginalComment,
GithubOriginalLabel,
GithubOriginalMileStone,
GithubOriginalPullRequest,
GithubOriginalState,
GithubOriginalUser,
} from '../github-api-responses';
export type GithubState = GithubOriginalState;
export type GithubUser = GithubOriginalUser;
export type GithubLabel = GithubOriginalLabel;
export type GithubMileStone = GithubOriginalMileStone;
export type GithubPullRequest = GithubOriginalPullRequest;
export type GithubComment = GithubOriginalComment;
export type GithubIssueReduced = Readonly<{
// eslint-disable-next-line id-blacklist
state: GithubState;
title: string;
// to make it consistent with non reduced issue
updated_at: string;
// NOTE: we use the issue number as id as well, as it there is not much to be done with the id with the api
id: number;
number: number;
// to include labels as tags
labels: GithubLabel[];
// removed
// node_id: string;
// assignees: GithubOriginalUser[];
// repository: GithubOriginalRepository;
}>;
export type GithubIssue = GithubIssueReduced &
Readonly<{
number: number;
repository_url: string;
labels_url: string;
comments_url: string;
events_url: string;
html_url: string;
body: string;
// labels: GithubLabel[];
milestone: GithubMileStone;
locked: boolean;
active_lock_reason: string;
pull_request: GithubPullRequest;
closed_at: string;
created_at: string;
user: GithubUser;
assignee: GithubUser;
// added TODO check if we can remove them
commentsNr: number;
apiUrl: string;
_id: number;
// transformed
url: string;
// added via extra request??
comments: GithubComment[];
}>;