@dsh-plugin/dsh-synapse 0.1.0-dev.41044228975 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +0 -14
  3. package/package.json +1 -1
  4. package/vendor/gugle-chat-bot/LICENSE +661 -661
  5. package/vendor/gugle-chat-bot/package.json +57 -57
  6. package/vendor/gugle-chat-bot/src/allow-rule.yml +9345 -9345
  7. package/vendor/gugle-chat-bot/src/api.json +4284 -4284
  8. package/vendor/gugle-chat-bot/src/command/index.ts +141 -141
  9. package/vendor/gugle-chat-bot/src/config/features.ts +547 -547
  10. package/vendor/gugle-chat-bot/src/config/index.ts +184 -184
  11. package/vendor/gugle-chat-bot/src/config/manager.ts +356 -356
  12. package/vendor/gugle-chat-bot/src/constants/index.ts +13 -13
  13. package/vendor/gugle-chat-bot/src/custom.ts +548 -548
  14. package/vendor/gugle-chat-bot/src/event/index.ts +118 -118
  15. package/vendor/gugle-chat-bot/src/features/admin/index.ts +414 -414
  16. package/vendor/gugle-chat-bot/src/features/bili/image/impl/video.ts +39 -39
  17. package/vendor/gugle-chat-bot/src/features/bili/image/index.ts +37 -37
  18. package/vendor/gugle-chat-bot/src/features/bili/index.ts +65 -65
  19. package/vendor/gugle-chat-bot/src/features/bili/template/style/video.css +97 -97
  20. package/vendor/gugle-chat-bot/src/features/bili/template/video.html +56 -56
  21. package/vendor/gugle-chat-bot/src/features/discord-bridge/index.ts +1128 -1128
  22. package/vendor/gugle-chat-bot/src/features/discord-bridge/markdown.ts +105 -105
  23. package/vendor/gugle-chat-bot/src/features/discord-bridge/slash.ts +355 -355
  24. package/vendor/gugle-chat-bot/src/features/discord-bridge/source.ts +96 -96
  25. package/vendor/gugle-chat-bot/src/features/discord-bridge/template/message.html +14 -14
  26. package/vendor/gugle-chat-bot/src/features/discord-bridge/template/style/message.css +144 -144
  27. package/vendor/gugle-chat-bot/src/features/github/api.ts +93 -93
  28. package/vendor/gugle-chat-bot/src/features/github/binding.ts +161 -161
  29. package/vendor/gugle-chat-bot/src/features/github/image/impl/issue.ts +132 -132
  30. package/vendor/gugle-chat-bot/src/features/github/image/impl/pr.ts +144 -144
  31. package/vendor/gugle-chat-bot/src/features/github/image/impl/release.ts +160 -160
  32. package/vendor/gugle-chat-bot/src/features/github/image/index.ts +310 -310
  33. package/vendor/gugle-chat-bot/src/features/github/index.ts +302 -302
  34. package/vendor/gugle-chat-bot/src/features/github/template/issue.html +118 -118
  35. package/vendor/gugle-chat-bot/src/features/github/template/pull_request.html +125 -125
  36. package/vendor/gugle-chat-bot/src/features/github/template/release.html +53 -53
  37. package/vendor/gugle-chat-bot/src/features/github/template/style/issue.css +468 -468
  38. package/vendor/gugle-chat-bot/src/features/github/template/style/pull_request.css +468 -468
  39. package/vendor/gugle-chat-bot/src/features/github/template/style/release.css +412 -412
  40. package/vendor/gugle-chat-bot/src/features/hermes/client.ts +184 -184
  41. package/vendor/gugle-chat-bot/src/features/hermes/config.ts +210 -210
  42. package/vendor/gugle-chat-bot/src/features/hermes/context.ts +67 -67
  43. package/vendor/gugle-chat-bot/src/features/hermes/history.ts +86 -86
  44. package/vendor/gugle-chat-bot/src/features/hermes/index.ts +1533 -1533
  45. package/vendor/gugle-chat-bot/src/features/hermes/message.ts +319 -319
  46. package/vendor/gugle-chat-bot/src/features/hermes/reaction.ts +181 -181
  47. package/vendor/gugle-chat-bot/src/features/hermes/render.ts +118 -118
  48. package/vendor/gugle-chat-bot/src/features/hermes/reply-units.ts +331 -331
  49. package/vendor/gugle-chat-bot/src/features/hermes/skills.ts +406 -406
  50. package/vendor/gugle-chat-bot/src/features/hermes/template/approval.html +30 -30
  51. package/vendor/gugle-chat-bot/src/features/hermes/template/progress.html +21 -21
  52. package/vendor/gugle-chat-bot/src/features/hermes/template/style/approval.css +81 -81
  53. package/vendor/gugle-chat-bot/src/features/hermes/template/style/progress.css +120 -120
  54. package/vendor/gugle-chat-bot/src/features/hermes/trigger.ts +86 -86
  55. package/vendor/gugle-chat-bot/src/features/hermes/types.ts +327 -327
  56. package/vendor/gugle-chat-bot/src/features/management/index.ts +156 -156
  57. package/vendor/gugle-chat-bot/src/features/minecraft/index.ts +127 -127
  58. package/vendor/gugle-chat-bot/src/features/modrinth/index.ts +71 -71
  59. package/vendor/gugle-chat-bot/src/features/parentheses/index.ts +117 -117
  60. package/vendor/gugle-chat-bot/src/features/peak-valley-timer/index.ts +451 -451
  61. package/vendor/gugle-chat-bot/src/features/poke/index.ts +24 -24
  62. package/vendor/gugle-chat-bot/src/features/version-tracker/index.ts +77 -77
  63. package/vendor/gugle-chat-bot/src/features/welcome/index.ts +57 -57
  64. package/vendor/gugle-chat-bot/src/github-ip.json +5814 -5814
  65. package/vendor/gugle-chat-bot/src/image/index.ts +278 -278
  66. package/vendor/gugle-chat-bot/src/index.ts +695 -695
  67. package/vendor/gugle-chat-bot/src/logger/index.ts +54 -54
  68. package/vendor/gugle-chat-bot/src/result.json +359 -359
  69. package/vendor/gugle-chat-bot/src/type/bili.d.ts +825 -825
  70. package/vendor/gugle-chat-bot/src/type/event.d.ts +146 -146
  71. package/vendor/gugle-chat-bot/src/type/github.d.ts +446 -446
  72. package/vendor/gugle-chat-bot/src/type/index.d.ts +254 -254
  73. package/vendor/gugle-chat-bot/tsconfig.json +46 -46
  74. package/scripts/dump-npm-latest.mjs +0 -30
@@ -1,446 +1,446 @@
1
- export interface User {
2
- avatar_url: string;
3
- deleted?: boolean;
4
- email?: string;
5
- html_url: string;
6
- id: number;
7
- login: string;
8
- name?: string;
9
- type: 'Bot' | 'User' | 'Organization';
10
- }
11
-
12
- export interface Label {
13
- color: string;
14
- name: string;
15
- description?: string;
16
- }
17
-
18
- export type State = 'open' | 'closed';
19
-
20
- export type IssueStateReason = 'completed' | 'duplicate' | 'not_planned' | string;
21
-
22
- export interface Issue {
23
- title: string | number;
24
- number: number;
25
- body?: string;
26
- assignee?: User;
27
- state: State;
28
- state_reason?: IssueStateReason;
29
- milestone?: Milestone;
30
- labels: Label[];
31
- assignees?: User[];
32
- type: string;
33
- user: User;
34
- created_at: string;
35
- html_url?: string;
36
- repository_url?: string;
37
- }
38
-
39
- export interface PullRequest {
40
- title: string | number;
41
- number: number;
42
- body?: string;
43
- requested_reviewers?: User;
44
- assignee?: User;
45
- state: State;
46
- milestone?: Milestone;
47
- labels: Label[];
48
- assignees?: User[];
49
- user: User;
50
- merged: boolean;
51
- draft?: boolean;
52
- created_at: string;
53
- html_url?: string;
54
- repository_url?: string;
55
- }
56
-
57
- export interface Organization {
58
- id: number;
59
- login: string;
60
- description: string;
61
- avatar_url: string;
62
- }
63
-
64
- export type Privacy = State | 'secret';
65
- export interface Team {
66
- id: number;
67
- name: string;
68
- slug: string;
69
- description: string;
70
- node_id: string;
71
- url: string;
72
- html_url: string;
73
- repositories_url: string;
74
- members_url: string;
75
- permission: string;
76
- privacy: Privacy;
77
- deleted?: boolean;
78
- parent?: Team;
79
- }
80
-
81
- export interface Repository {
82
- id: number;
83
- name: string;
84
- full_name: string;
85
- owner: User;
86
- html_url: string;
87
- }
88
-
89
- export interface Milestone {
90
- closed_at?: string;
91
- closed_issues: number;
92
- created_at: string;
93
- creator?: User;
94
- description?: string;
95
- due_on?: string;
96
- html_url: string;
97
- labels_url: string;
98
- node_id: string;
99
- number: string;
100
- open_issues: number;
101
- state: State;
102
- title: string;
103
- updated_at: string;
104
- url: string;
105
- }
106
-
107
- export interface TypeOfIssue {
108
- id: number;
109
- name: string;
110
- description?: string;
111
- color?: string;
112
- created_at?: string;
113
- updated_at?: string;
114
- is_enabled?: boolean;
115
- }
116
-
117
- export interface IssueEvent {
118
- issue: Issue;
119
- organization?: Organization;
120
- repository: Repository;
121
- sender: User;
122
- }
123
-
124
- export type AssignedIssueEvent = IssueEvent & {
125
- action: 'assigned';
126
- assignee?: User;
127
- };
128
-
129
- export type ClosedIssueEvent = IssueEvent & {
130
- action: 'closed';
131
- };
132
-
133
- export type DeletedIssueEvent = IssueEvent & {
134
- action: 'deleted';
135
- };
136
-
137
- export type DemilestonedIssueEvent = IssueEvent & {
138
- action: 'demilestoned';
139
- milestone: Milestone;
140
- };
141
-
142
- export type EditedIssueEvent = IssueEvent & {
143
- action: 'edited';
144
- changes: {
145
- body?: {
146
- from: string;
147
- };
148
- title?: {
149
- from: string;
150
- };
151
- };
152
- };
153
-
154
- export type LabeledIssueEvent = IssueEvent & {
155
- action: 'labeled';
156
- label: Label;
157
- };
158
-
159
- export type LockedIssueEvent = IssueEvent & {
160
- action: 'locked';
161
- };
162
-
163
- export type MilestonedIssueEvent = IssueEvent & {
164
- action: 'milestoned';
165
- milestone: Milestone;
166
- };
167
-
168
- export type OpenedIssueEvent = IssueEvent & {
169
- action: 'opened';
170
- changes?: {
171
- old_issue: Issue;
172
- old_repository: Repository;
173
- };
174
- };
175
-
176
- export type PinnedIssueEvent = IssueEvent & {
177
- action: 'pinned';
178
- };
179
-
180
- export type ReopenedIssueEvent = IssueEvent & {
181
- action: 'reopened';
182
- };
183
-
184
- export type TransferredIssueEvent = IssueEvent & {
185
- action: 'transferred';
186
- changes: {
187
- new_issue: Issue;
188
- new_repository: Repository;
189
- };
190
- };
191
-
192
- export type TypedIssueEvent = IssueEvent & {
193
- action: 'typed';
194
- type: TypeOfIssue;
195
- };
196
-
197
- export type UnassignedIssueEvent = IssueEvent & {
198
- action: 'unassigned';
199
- assignee?: User;
200
- };
201
-
202
- export type UnlabeledIssueEvent = IssueEvent & {
203
- action: 'unlabeled';
204
- label?: Label;
205
- };
206
-
207
- export type UnpinnedIssueEvent = IssueEvent & {
208
- action: 'unpinned';
209
- };
210
-
211
- export type UntypedIssueEvent = IssueEvent & {
212
- action: 'untyped';
213
- type: TypeOfIssue;
214
- };
215
-
216
- export type AllIssueEvent =
217
- | AssignedIssueEvent
218
- | ClosedIssueEvent
219
- | DeletedIssueEvent
220
- | DemilestonedIssueEvent
221
- | EditedIssueEvent
222
- | LabeledIssueEvent
223
- | LockedIssueEvent
224
- | MilestonedIssueEvent
225
- | OpenedIssueEvent
226
- | PinnedIssueEvent
227
- | ReopenedIssueEvent
228
- | TransferredIssueEvent
229
- | TypedIssueEvent
230
- | UnassignedIssueEvent
231
- | UnlabeledIssueEvent
232
- | UnpinnedIssueEvent
233
- | UntypedIssueEvent;
234
-
235
- export interface PullRequestEvent {
236
- pull_request: PullRequest;
237
- organization?: Organization;
238
- repository: Repository;
239
- sender: User;
240
- }
241
-
242
- export type AssignedPullRequestEvent = PullRequestEvent & {
243
- action: 'assigned';
244
- assignee?: User;
245
- };
246
-
247
- export type AutoMergeDisabledPullRequestEvent = PullRequestEvent & {
248
- action: 'auto_merge_disabled';
249
- reason: string;
250
- };
251
-
252
- export type AutoMergeEnabledPullRequestEvent = PullRequestEvent & {
253
- action: 'auto_merge_enabled';
254
- reason?: string;
255
- };
256
-
257
- export type ClosedPullRequestEvent = PullRequestEvent & {
258
- action: 'closed';
259
- };
260
-
261
- export type ConvertedToDraftPullRequestEvent = PullRequestEvent & {
262
- action: 'converted_to_draft';
263
- };
264
-
265
- export type DemilestonedPullRequestEvent = PullRequestEvent & {
266
- action: 'demilestoned';
267
- milestone?: Milestone;
268
- };
269
-
270
- export type DequeuedReason =
271
- | 'UNKNOWN_REMOVAL_REASON'
272
- | 'MANUAL'
273
- | 'MERGE'
274
- | 'MERGE_CONFLICT'
275
- | 'CI_FAILURE'
276
- | 'CI_TIMEOUT'
277
- | 'ALREADY_MERGED'
278
- | 'QUEUE_CLEARED'
279
- | 'ROLL_BACK'
280
- | 'BRANCH_PROTECTIONS'
281
- | 'GIT_TREE_INVALID'
282
- | 'INVALID_MERGE_COMMIT';
283
- export type DequeuedPullRequestEvent = PullRequestEvent & {
284
- action: 'dequeued';
285
- reason: DequeuedReason;
286
- };
287
-
288
- export type EditedPullRequestEvent = PullRequestEvent & {
289
- action: 'edited';
290
- changes: {
291
- base: {
292
- ref: {
293
- from: string;
294
- };
295
- sha: {
296
- from: string;
297
- };
298
- };
299
- body?: {
300
- from: string;
301
- };
302
- title?: {
303
- from: string;
304
- };
305
- };
306
- };
307
-
308
- export type EnqueuedPullRequestEvent = PullRequestEvent & {
309
- action: 'enqueued';
310
- };
311
-
312
- export type LabeledPullRequestEvent = PullRequestEvent & {
313
- action: 'labeled';
314
- label?: Label;
315
- };
316
-
317
- export type LockedPullRequestEvent = PullRequestEvent & {
318
- action: 'locked';
319
- };
320
-
321
- export type MilestonedPullRequestEvent = PullRequestEvent & {
322
- action: 'milestoned';
323
- milestone?: Milestone;
324
- };
325
-
326
- export type OpenedPullRequestEvent = PullRequestEvent & {
327
- action: 'opened';
328
- };
329
-
330
- export type ReadyForReviewPullRequestEvent = PullRequestEvent & {
331
- action: 'ready_for_review';
332
- };
333
-
334
- export type ReopenedPullRequestEvent = PullRequestEvent & {
335
- action: 'reopened';
336
- };
337
-
338
- export type ReviewRequestRemovedPullRequestEvent = PullRequestEvent & {
339
- action: 'review_request_removed';
340
- requested_reviewer?: User;
341
- requested_team: Team;
342
- };
343
-
344
- export type ReviewRequestedPullRequestEvent = PullRequestEvent & {
345
- action: 'review_requested';
346
- requested_reviewer?: User;
347
- requested_team: Team;
348
- };
349
-
350
- export type SynchronizePullRequestEvent = PullRequestEvent & {
351
- action: 'synchronize';
352
- after: string;
353
- before: string;
354
- };
355
-
356
- export type UnassignedPullRequestEvent = PullRequestEvent & {
357
- action: 'unassigned';
358
- assignee?: User;
359
- };
360
-
361
- export type UnlabeledPullRequestEvent = PullRequestEvent & {
362
- action: 'unlabeled';
363
- label?: Label;
364
- };
365
-
366
- export type UnlockedPullRequestEvent = PullRequestEvent & {
367
- action: 'unlocked';
368
- };
369
-
370
- export type AllPullRequestEvent =
371
- | AssignedPullRequestEvent
372
- | AutoMergeDisabledPullRequestEvent
373
- | AutoMergeEnabledPullRequestEvent
374
- | ClosedPullRequestEvent
375
- | ConvertedToDraftPullRequestEvent
376
- | DemilestonedPullRequestEvent
377
- | DequeuedPullRequestEvent
378
- | EditedPullRequestEvent
379
- | EnqueuedPullRequestEvent
380
- | LabeledPullRequestEvent
381
- | LockedPullRequestEvent
382
- | MilestonedPullRequestEvent
383
- | OpenedPullRequestEvent
384
- | ReadyForReviewPullRequestEvent
385
- | ReopenedPullRequestEvent
386
- | ReviewRequestRemovedPullRequestEvent
387
- | ReviewRequestedPullRequestEvent
388
- | SynchronizePullRequestEvent
389
- | UnassignedPullRequestEvent
390
- | UnlabeledPullRequestEvent
391
- | UnlockedPullRequestEvent;
392
-
393
- /** release 上传的附件(如 jar 构建产物) */
394
- export interface ReleaseAsset {
395
- id: number;
396
- name: string;
397
- label?: string | null;
398
- content_type: string;
399
- state: 'uploaded' | 'open' | string;
400
- size: number;
401
- download_count: number;
402
- created_at: string;
403
- updated_at: string;
404
- browser_download_url: string;
405
- uploader?: User;
406
- }
407
-
408
- export interface Release {
409
- id: number;
410
- tag_name: string;
411
- target_commitish: string;
412
- name: string | null;
413
- body?: string | null;
414
- draft: boolean;
415
- prerelease: boolean;
416
- created_at: string;
417
- published_at: string | null;
418
- html_url: string;
419
- url: string;
420
- tarball_url?: string | null;
421
- zipball_url?: string | null;
422
- author: User;
423
- assets: ReleaseAsset[];
424
- }
425
-
426
- export type ReleaseEvent = {
427
- action: 'published' | 'released' | 'created' | 'edited' | 'deleted' | 'prereleased' | 'unpublished';
428
- release: Release;
429
- repository: Repository;
430
- sender: User;
431
- organization?: Organization;
432
- };
433
-
434
- export type PublishedReleaseEvent = ReleaseEvent & {
435
- action: 'published';
436
- };
437
-
438
- export type ReleasedReleaseEvent = ReleaseEvent & {
439
- action: 'released';
440
- };
441
-
442
- export type PrereleasedReleaseEvent = ReleaseEvent & {
443
- action: 'prereleased';
444
- };
445
-
446
- export type AllReleaseEvent = ReleaseEvent;
1
+ export interface User {
2
+ avatar_url: string;
3
+ deleted?: boolean;
4
+ email?: string;
5
+ html_url: string;
6
+ id: number;
7
+ login: string;
8
+ name?: string;
9
+ type: 'Bot' | 'User' | 'Organization';
10
+ }
11
+
12
+ export interface Label {
13
+ color: string;
14
+ name: string;
15
+ description?: string;
16
+ }
17
+
18
+ export type State = 'open' | 'closed';
19
+
20
+ export type IssueStateReason = 'completed' | 'duplicate' | 'not_planned' | string;
21
+
22
+ export interface Issue {
23
+ title: string | number;
24
+ number: number;
25
+ body?: string;
26
+ assignee?: User;
27
+ state: State;
28
+ state_reason?: IssueStateReason;
29
+ milestone?: Milestone;
30
+ labels: Label[];
31
+ assignees?: User[];
32
+ type: string;
33
+ user: User;
34
+ created_at: string;
35
+ html_url?: string;
36
+ repository_url?: string;
37
+ }
38
+
39
+ export interface PullRequest {
40
+ title: string | number;
41
+ number: number;
42
+ body?: string;
43
+ requested_reviewers?: User;
44
+ assignee?: User;
45
+ state: State;
46
+ milestone?: Milestone;
47
+ labels: Label[];
48
+ assignees?: User[];
49
+ user: User;
50
+ merged: boolean;
51
+ draft?: boolean;
52
+ created_at: string;
53
+ html_url?: string;
54
+ repository_url?: string;
55
+ }
56
+
57
+ export interface Organization {
58
+ id: number;
59
+ login: string;
60
+ description: string;
61
+ avatar_url: string;
62
+ }
63
+
64
+ export type Privacy = State | 'secret';
65
+ export interface Team {
66
+ id: number;
67
+ name: string;
68
+ slug: string;
69
+ description: string;
70
+ node_id: string;
71
+ url: string;
72
+ html_url: string;
73
+ repositories_url: string;
74
+ members_url: string;
75
+ permission: string;
76
+ privacy: Privacy;
77
+ deleted?: boolean;
78
+ parent?: Team;
79
+ }
80
+
81
+ export interface Repository {
82
+ id: number;
83
+ name: string;
84
+ full_name: string;
85
+ owner: User;
86
+ html_url: string;
87
+ }
88
+
89
+ export interface Milestone {
90
+ closed_at?: string;
91
+ closed_issues: number;
92
+ created_at: string;
93
+ creator?: User;
94
+ description?: string;
95
+ due_on?: string;
96
+ html_url: string;
97
+ labels_url: string;
98
+ node_id: string;
99
+ number: string;
100
+ open_issues: number;
101
+ state: State;
102
+ title: string;
103
+ updated_at: string;
104
+ url: string;
105
+ }
106
+
107
+ export interface TypeOfIssue {
108
+ id: number;
109
+ name: string;
110
+ description?: string;
111
+ color?: string;
112
+ created_at?: string;
113
+ updated_at?: string;
114
+ is_enabled?: boolean;
115
+ }
116
+
117
+ export interface IssueEvent {
118
+ issue: Issue;
119
+ organization?: Organization;
120
+ repository: Repository;
121
+ sender: User;
122
+ }
123
+
124
+ export type AssignedIssueEvent = IssueEvent & {
125
+ action: 'assigned';
126
+ assignee?: User;
127
+ };
128
+
129
+ export type ClosedIssueEvent = IssueEvent & {
130
+ action: 'closed';
131
+ };
132
+
133
+ export type DeletedIssueEvent = IssueEvent & {
134
+ action: 'deleted';
135
+ };
136
+
137
+ export type DemilestonedIssueEvent = IssueEvent & {
138
+ action: 'demilestoned';
139
+ milestone: Milestone;
140
+ };
141
+
142
+ export type EditedIssueEvent = IssueEvent & {
143
+ action: 'edited';
144
+ changes: {
145
+ body?: {
146
+ from: string;
147
+ };
148
+ title?: {
149
+ from: string;
150
+ };
151
+ };
152
+ };
153
+
154
+ export type LabeledIssueEvent = IssueEvent & {
155
+ action: 'labeled';
156
+ label: Label;
157
+ };
158
+
159
+ export type LockedIssueEvent = IssueEvent & {
160
+ action: 'locked';
161
+ };
162
+
163
+ export type MilestonedIssueEvent = IssueEvent & {
164
+ action: 'milestoned';
165
+ milestone: Milestone;
166
+ };
167
+
168
+ export type OpenedIssueEvent = IssueEvent & {
169
+ action: 'opened';
170
+ changes?: {
171
+ old_issue: Issue;
172
+ old_repository: Repository;
173
+ };
174
+ };
175
+
176
+ export type PinnedIssueEvent = IssueEvent & {
177
+ action: 'pinned';
178
+ };
179
+
180
+ export type ReopenedIssueEvent = IssueEvent & {
181
+ action: 'reopened';
182
+ };
183
+
184
+ export type TransferredIssueEvent = IssueEvent & {
185
+ action: 'transferred';
186
+ changes: {
187
+ new_issue: Issue;
188
+ new_repository: Repository;
189
+ };
190
+ };
191
+
192
+ export type TypedIssueEvent = IssueEvent & {
193
+ action: 'typed';
194
+ type: TypeOfIssue;
195
+ };
196
+
197
+ export type UnassignedIssueEvent = IssueEvent & {
198
+ action: 'unassigned';
199
+ assignee?: User;
200
+ };
201
+
202
+ export type UnlabeledIssueEvent = IssueEvent & {
203
+ action: 'unlabeled';
204
+ label?: Label;
205
+ };
206
+
207
+ export type UnpinnedIssueEvent = IssueEvent & {
208
+ action: 'unpinned';
209
+ };
210
+
211
+ export type UntypedIssueEvent = IssueEvent & {
212
+ action: 'untyped';
213
+ type: TypeOfIssue;
214
+ };
215
+
216
+ export type AllIssueEvent =
217
+ | AssignedIssueEvent
218
+ | ClosedIssueEvent
219
+ | DeletedIssueEvent
220
+ | DemilestonedIssueEvent
221
+ | EditedIssueEvent
222
+ | LabeledIssueEvent
223
+ | LockedIssueEvent
224
+ | MilestonedIssueEvent
225
+ | OpenedIssueEvent
226
+ | PinnedIssueEvent
227
+ | ReopenedIssueEvent
228
+ | TransferredIssueEvent
229
+ | TypedIssueEvent
230
+ | UnassignedIssueEvent
231
+ | UnlabeledIssueEvent
232
+ | UnpinnedIssueEvent
233
+ | UntypedIssueEvent;
234
+
235
+ export interface PullRequestEvent {
236
+ pull_request: PullRequest;
237
+ organization?: Organization;
238
+ repository: Repository;
239
+ sender: User;
240
+ }
241
+
242
+ export type AssignedPullRequestEvent = PullRequestEvent & {
243
+ action: 'assigned';
244
+ assignee?: User;
245
+ };
246
+
247
+ export type AutoMergeDisabledPullRequestEvent = PullRequestEvent & {
248
+ action: 'auto_merge_disabled';
249
+ reason: string;
250
+ };
251
+
252
+ export type AutoMergeEnabledPullRequestEvent = PullRequestEvent & {
253
+ action: 'auto_merge_enabled';
254
+ reason?: string;
255
+ };
256
+
257
+ export type ClosedPullRequestEvent = PullRequestEvent & {
258
+ action: 'closed';
259
+ };
260
+
261
+ export type ConvertedToDraftPullRequestEvent = PullRequestEvent & {
262
+ action: 'converted_to_draft';
263
+ };
264
+
265
+ export type DemilestonedPullRequestEvent = PullRequestEvent & {
266
+ action: 'demilestoned';
267
+ milestone?: Milestone;
268
+ };
269
+
270
+ export type DequeuedReason =
271
+ | 'UNKNOWN_REMOVAL_REASON'
272
+ | 'MANUAL'
273
+ | 'MERGE'
274
+ | 'MERGE_CONFLICT'
275
+ | 'CI_FAILURE'
276
+ | 'CI_TIMEOUT'
277
+ | 'ALREADY_MERGED'
278
+ | 'QUEUE_CLEARED'
279
+ | 'ROLL_BACK'
280
+ | 'BRANCH_PROTECTIONS'
281
+ | 'GIT_TREE_INVALID'
282
+ | 'INVALID_MERGE_COMMIT';
283
+ export type DequeuedPullRequestEvent = PullRequestEvent & {
284
+ action: 'dequeued';
285
+ reason: DequeuedReason;
286
+ };
287
+
288
+ export type EditedPullRequestEvent = PullRequestEvent & {
289
+ action: 'edited';
290
+ changes: {
291
+ base: {
292
+ ref: {
293
+ from: string;
294
+ };
295
+ sha: {
296
+ from: string;
297
+ };
298
+ };
299
+ body?: {
300
+ from: string;
301
+ };
302
+ title?: {
303
+ from: string;
304
+ };
305
+ };
306
+ };
307
+
308
+ export type EnqueuedPullRequestEvent = PullRequestEvent & {
309
+ action: 'enqueued';
310
+ };
311
+
312
+ export type LabeledPullRequestEvent = PullRequestEvent & {
313
+ action: 'labeled';
314
+ label?: Label;
315
+ };
316
+
317
+ export type LockedPullRequestEvent = PullRequestEvent & {
318
+ action: 'locked';
319
+ };
320
+
321
+ export type MilestonedPullRequestEvent = PullRequestEvent & {
322
+ action: 'milestoned';
323
+ milestone?: Milestone;
324
+ };
325
+
326
+ export type OpenedPullRequestEvent = PullRequestEvent & {
327
+ action: 'opened';
328
+ };
329
+
330
+ export type ReadyForReviewPullRequestEvent = PullRequestEvent & {
331
+ action: 'ready_for_review';
332
+ };
333
+
334
+ export type ReopenedPullRequestEvent = PullRequestEvent & {
335
+ action: 'reopened';
336
+ };
337
+
338
+ export type ReviewRequestRemovedPullRequestEvent = PullRequestEvent & {
339
+ action: 'review_request_removed';
340
+ requested_reviewer?: User;
341
+ requested_team: Team;
342
+ };
343
+
344
+ export type ReviewRequestedPullRequestEvent = PullRequestEvent & {
345
+ action: 'review_requested';
346
+ requested_reviewer?: User;
347
+ requested_team: Team;
348
+ };
349
+
350
+ export type SynchronizePullRequestEvent = PullRequestEvent & {
351
+ action: 'synchronize';
352
+ after: string;
353
+ before: string;
354
+ };
355
+
356
+ export type UnassignedPullRequestEvent = PullRequestEvent & {
357
+ action: 'unassigned';
358
+ assignee?: User;
359
+ };
360
+
361
+ export type UnlabeledPullRequestEvent = PullRequestEvent & {
362
+ action: 'unlabeled';
363
+ label?: Label;
364
+ };
365
+
366
+ export type UnlockedPullRequestEvent = PullRequestEvent & {
367
+ action: 'unlocked';
368
+ };
369
+
370
+ export type AllPullRequestEvent =
371
+ | AssignedPullRequestEvent
372
+ | AutoMergeDisabledPullRequestEvent
373
+ | AutoMergeEnabledPullRequestEvent
374
+ | ClosedPullRequestEvent
375
+ | ConvertedToDraftPullRequestEvent
376
+ | DemilestonedPullRequestEvent
377
+ | DequeuedPullRequestEvent
378
+ | EditedPullRequestEvent
379
+ | EnqueuedPullRequestEvent
380
+ | LabeledPullRequestEvent
381
+ | LockedPullRequestEvent
382
+ | MilestonedPullRequestEvent
383
+ | OpenedPullRequestEvent
384
+ | ReadyForReviewPullRequestEvent
385
+ | ReopenedPullRequestEvent
386
+ | ReviewRequestRemovedPullRequestEvent
387
+ | ReviewRequestedPullRequestEvent
388
+ | SynchronizePullRequestEvent
389
+ | UnassignedPullRequestEvent
390
+ | UnlabeledPullRequestEvent
391
+ | UnlockedPullRequestEvent;
392
+
393
+ /** release 上传的附件(如 jar 构建产物) */
394
+ export interface ReleaseAsset {
395
+ id: number;
396
+ name: string;
397
+ label?: string | null;
398
+ content_type: string;
399
+ state: 'uploaded' | 'open' | string;
400
+ size: number;
401
+ download_count: number;
402
+ created_at: string;
403
+ updated_at: string;
404
+ browser_download_url: string;
405
+ uploader?: User;
406
+ }
407
+
408
+ export interface Release {
409
+ id: number;
410
+ tag_name: string;
411
+ target_commitish: string;
412
+ name: string | null;
413
+ body?: string | null;
414
+ draft: boolean;
415
+ prerelease: boolean;
416
+ created_at: string;
417
+ published_at: string | null;
418
+ html_url: string;
419
+ url: string;
420
+ tarball_url?: string | null;
421
+ zipball_url?: string | null;
422
+ author: User;
423
+ assets: ReleaseAsset[];
424
+ }
425
+
426
+ export type ReleaseEvent = {
427
+ action: 'published' | 'released' | 'created' | 'edited' | 'deleted' | 'prereleased' | 'unpublished';
428
+ release: Release;
429
+ repository: Repository;
430
+ sender: User;
431
+ organization?: Organization;
432
+ };
433
+
434
+ export type PublishedReleaseEvent = ReleaseEvent & {
435
+ action: 'published';
436
+ };
437
+
438
+ export type ReleasedReleaseEvent = ReleaseEvent & {
439
+ action: 'released';
440
+ };
441
+
442
+ export type PrereleasedReleaseEvent = ReleaseEvent & {
443
+ action: 'prereleased';
444
+ };
445
+
446
+ export type AllReleaseEvent = ReleaseEvent;