-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomment-types.ts
37 lines (34 loc) · 884 Bytes
/
comment-types.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
export enum CommentKind {
/**
* Pull-request related item
*/
PULL = 0b1,
/**
* Issue related item
*/
ISSUE = 0b10,
}
export enum CommentAssociation {
/**
* User assigned to the {@link CommentKind.ISSUE} or {@link CommentKind.PULL}
*/
ASSIGNEE = 0b100,
/**
* The author of the {@link CommentKind.ISSUE} or {@link CommentKind.PULL}
*/
AUTHOR = 0b1000,
/**
* A user that is part of the organization or owner of the repo
*/
COLLABORATOR = 0b10000,
/**
* A user that is NOT part of the organization nor owner of the repo
*/
CONTRIBUTOR = 0b100000,
/**
* {@link CommentKind.ISSUE} or {@link CommentKind.PULL} opening item
*/
SPECIFICATION = 0b10000000,
}
export const commentEnum = { ...CommentAssociation, ...CommentKind };
export type CommentType = `${keyof typeof CommentKind}_${keyof typeof CommentAssociation}`;