generated from NatoBoram/gigachad.ts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcomment_added.ts
132 lines (119 loc) · 3.08 KB
/
comment_added.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import type {
SchemaApplicationUser,
SchemaComment,
SchemaProject,
SchemaPullRequest,
SchemaPullRequestParticipant,
SchemaRepository,
SchemaRestMinimalRef,
} from "../../../openapi/openapi-typescript.ts"
import type { SuggestionState } from "../suggestion_state.ts"
export interface Actor {
readonly active: boolean
readonly displayName: string
readonly emailAddress: string
readonly id: number
readonly links: ActorLinks
readonly name: string
readonly slug: string
readonly type: SchemaApplicationUser["type"]
}
export interface ActorLinks {
readonly self: Self[]
}
export interface Author {
readonly approved: boolean
readonly role: SchemaPullRequestParticipant["role"]
readonly status: string
readonly user: Actor
}
export interface Clone {
readonly href: string
readonly name: string
}
export interface Comment {
readonly author: Actor
readonly comments: unknown[]
readonly createdDate: number
readonly id: number
readonly properties: Properties
readonly severity: string
readonly state: SchemaComment["state"]
readonly tasks?: unknown[]
readonly text: string
readonly threadResolved: boolean
readonly updatedDate: number
readonly version: number
}
/** A user comments on a pull request. This payload comes with an event key of `pr:comment:added`. */
export interface PRCommentAdded {
/** The user that created the comment. */
readonly actor: Actor
/** The comment created. */
readonly comment: Comment
/** Id of the parent comment if one exists. */
readonly commentParentId?: number
readonly date: string
readonly eventKey: "pr:comment:added"
/** The pull request comment on. */
readonly pullRequest: PullRequest
}
export interface Project {
readonly id: number
readonly key: string
readonly links: ActorLinks
readonly name: string
readonly public: boolean
readonly type: SchemaProject["type"]
}
export interface Properties {
readonly repositoryId: number
readonly suggestionState?: SuggestionState
}
export interface PullRequest {
readonly author: Author
readonly closed: boolean
readonly createdDate: number
readonly description: string
readonly draft: boolean
readonly fromRef: Ref
readonly id: number
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
readonly version: number
}
export interface Ref {
readonly displayId: string
readonly id: string
readonly latestCommit: string
readonly repository: Repository
readonly type: SchemaRestMinimalRef["type"]
}
export interface Repository {
readonly archived: boolean
readonly forkable: boolean
readonly hierarchyId: string
readonly id: number
readonly links: RepositoryLinks
readonly name: string
readonly project: Project
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
export interface RepositoryLinks {
readonly clone: Clone[]
readonly self: Self[]
}
export interface Self {
readonly href: string
}