-
Notifications
You must be signed in to change notification settings - Fork 0
/
github.d.ts
1307 lines (1305 loc) · 68.2 KB
/
github.d.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Event =
| "branch_protection_rule"
| "check_run"
| "check_suite"
| "create"
| "delete"
| "deployment"
| "deployment_status"
| "discussion"
| "discussion_comment"
| "fork"
| "gollum"
| "issue_comment"
| "issues"
| "label"
| "member"
| "milestone"
| "page_build"
| "project"
| "project_card"
| "project_column"
| "public"
| "pull_request"
| "pull_request_review"
| "pull_request_review_comment"
| "pull_request_target"
| "push"
| "registry_package"
| "release"
| "status"
| "watch"
| "workflow_call"
| "workflow_dispatch"
| "workflow_run"
| "repository_dispatch";
/**
* Runs your workflow anytime the branch_protection_rule event occurs. More than one activity type triggers this event.
*/
export type EventObject = {
types?: Types;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types = [
"created" | "edited" | "deleted",
...("created" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.
*/
export type EventObject1 = {
types?: Types1;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types1 = [
"created" | "rerequested" | "completed" | "requested_action",
...("created" | "rerequested" | "completed" | "requested_action")[],
];
/**
* Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.
*/
export type EventObject2 = {
types?: Types2;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types2 = [
"completed" | "requested" | "rerequested",
...("completed" | "requested" | "rerequested")[],
];
/**
* Runs your workflow anytime the discussion event occurs. More than one activity type triggers this event. For information about the GraphQL API, see https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions
*/
export type EventObject3 = {
types?: Types3;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types3 = [
(
| "created"
| "edited"
| "deleted"
| "transferred"
| "pinned"
| "unpinned"
| "labeled"
| "unlabeled"
| "locked"
| "unlocked"
| "category_changed"
| "answered"
| "unanswered"
),
...(
| "created"
| "edited"
| "deleted"
| "transferred"
| "pinned"
| "unpinned"
| "labeled"
| "unlabeled"
| "locked"
| "unlocked"
| "category_changed"
| "answered"
| "unanswered"
)[],
];
/**
* Runs your workflow anytime the discussion_comment event occurs. More than one activity type triggers this event. For information about the GraphQL API, see https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions
*/
export type EventObject4 = {
types?: Types4;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types4 = [
"created" | "edited" | "deleted",
...("created" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.
*/
export type EventObject5 = {
types?: Types5;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types5 = [
"created" | "edited" | "deleted",
...("created" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.
*/
export type EventObject6 = {
types?: Types6;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types6 = [
(
| "opened"
| "edited"
| "deleted"
| "transferred"
| "pinned"
| "unpinned"
| "closed"
| "reopened"
| "assigned"
| "unassigned"
| "labeled"
| "unlabeled"
| "locked"
| "unlocked"
| "milestoned"
| "demilestoned"
),
...(
| "opened"
| "edited"
| "deleted"
| "transferred"
| "pinned"
| "unpinned"
| "closed"
| "reopened"
| "assigned"
| "unassigned"
| "labeled"
| "unlabeled"
| "locked"
| "unlocked"
| "milestoned"
| "demilestoned"
)[],
];
/**
* Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.
*/
export type EventObject7 = {
types?: Types7;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types7 = [
"created" | "edited" | "deleted",
...("created" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the member event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/collaborators/.
*/
export type EventObject8 = {
types?: Types8;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types8 = [
"added" | "edited" | "deleted",
...("added" | "edited" | "deleted")[],
];
/**
* Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group. For information about the merge queue, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request-with-a-merge-queue .
*/
export type EventObject9 = {
types?: Types9;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types9 = ["checks_requested", ..."checks_requested"[]];
/**
* Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.
*/
export type EventObject10 = {
types?: Types10;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types10 = [
"created" | "closed" | "opened" | "edited" | "deleted",
...("created" | "closed" | "opened" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.
*/
export type EventObject11 = {
types?: Types11;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types11 = [
"created" | "updated" | "closed" | "reopened" | "edited" | "deleted",
...("created" | "updated" | "closed" | "reopened" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.
*/
export type EventObject12 = {
types?: Types12;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types12 = [
"created" | "moved" | "converted" | "edited" | "deleted",
...("created" | "moved" | "converted" | "edited" | "deleted")[],
];
/**
* Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.
*/
export type EventObject13 = {
types?: Types13;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types13 = [
"created" | "updated" | "moved" | "deleted",
...("created" | "updated" | "moved" | "deleted")[],
];
/**
* Runs your workflow anytime the pull_request event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls.
* Note: Workflows do not run on private base repositories when you open a pull request from a forked repository.
* When you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.
* Workflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.
* The permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.
*/
export type Ref = {
types?: Types14;
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^(branche|tag|path)s(-ignore)?$".
*/
[k: string]: unknown[] | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types14 = [
(
| "assigned"
| "unassigned"
| "labeled"
| "unlabeled"
| "opened"
| "edited"
| "closed"
| "reopened"
| "synchronize"
| "converted_to_draft"
| "ready_for_review"
| "locked"
| "unlocked"
| "review_requested"
| "review_request_removed"
| "auto_merge_enabled"
| "auto_merge_disabled"
),
...(
| "assigned"
| "unassigned"
| "labeled"
| "unlabeled"
| "opened"
| "edited"
| "closed"
| "reopened"
| "synchronize"
| "converted_to_draft"
| "ready_for_review"
| "locked"
| "unlocked"
| "review_requested"
| "review_request_removed"
| "auto_merge_enabled"
| "auto_merge_disabled"
)[],
];
/**
* Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.
* Note: Workflows do not run on private base repositories when you open a pull request from a forked repository.
* When you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.
* Workflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.
* The permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.
*/
export type EventObject14 = {
types?: Types15;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types15 = [
"submitted" | "edited" | "dismissed",
...("submitted" | "edited" | "dismissed")[],
];
/**
* Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.
* Note: Workflows do not run on private base repositories when you open a pull request from a forked repository.
* When you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.
* Workflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.
* The permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.
*/
export type EventObject15 = {
types?: Types16;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types16 = [
"created" | "edited" | "deleted",
...("created" | "edited" | "deleted")[],
];
/**
* This event is similar to pull_request, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run. For example, this event allows you to create workflows that label and comment on pull requests, based on the contents of the event payload.
*/
export type Ref1 = {
types?: Types17;
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^(branche|tag|path)s(-ignore)?$".
*/
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types17 = [
(
| "assigned"
| "unassigned"
| "labeled"
| "unlabeled"
| "opened"
| "edited"
| "closed"
| "reopened"
| "synchronize"
| "converted_to_draft"
| "ready_for_review"
| "locked"
| "unlocked"
| "review_requested"
| "review_request_removed"
| "auto_merge_enabled"
| "auto_merge_disabled"
),
...(
| "assigned"
| "unassigned"
| "labeled"
| "unlabeled"
| "opened"
| "edited"
| "closed"
| "reopened"
| "synchronize"
| "converted_to_draft"
| "ready_for_review"
| "locked"
| "unlocked"
| "review_requested"
| "review_request_removed"
| "auto_merge_enabled"
| "auto_merge_disabled"
)[],
];
/**
* Runs your workflow when someone pushes to a repository branch, which triggers the push event.
* Note: The webhook payload available to GitHub Actions does not include the added, removed, and modified attributes in the commit object. You can retrieve the full commit object using the REST API. For more information, see https://developer.github.com/v3/repos/commits/#get-a-single-commit.
*/
export type Ref2 = {
branches?: Branch;
"branches-ignore"?: Branch;
tags?: Branch;
"tags-ignore"?: Branch;
paths?: Path;
"paths-ignore"?: Path;
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^(branche|tag|path)s(-ignore)?$".
*/
[k: string]: string[] | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* When using the push and pull_request events, you can configure a workflow to run on specific branches or tags. If you only define only tags or only branches, the workflow won't run for events affecting the undefined Git ref.
* The branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one branch or tag name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.
* The patterns defined in branches and tags are evaluated against the Git ref's name. For example, defining the pattern mona/octocat in branches will match the refs/heads/mona/octocat Git ref. The pattern releases/** will match the refs/heads/releases/10 Git ref.
* You can use two types of filters to prevent a workflow from running on pushes and pull requests to tags and branches:
* - branches or branches-ignore - You cannot use both the branches and branches-ignore filters for the same event in a workflow. Use the branches filter when you need to filter branches for positive matches and exclude branches. Use the branches-ignore filter when you only need to exclude branch names.
* - tags or tags-ignore - You cannot use both the tags and tags-ignore filters for the same event in a workflow. Use the tags filter when you need to filter tags for positive matches and exclude tags. Use the tags-ignore filter when you only need to exclude tag names.
* You can exclude tags and branches using the ! character. The order that you define patterns matters.
* - A matching negative pattern (prefixed with !) after a positive match will exclude the Git ref.
* - A matching positive pattern after a negative match will include the Git ref again.
*
* @minItems 1
*/
export type Branch = [string, ...string[]];
/**
* When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.
* The paths-ignore and paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.
* You can exclude paths using two types of filters. You cannot use both of these filters for the same event in a workflow.
* - paths-ignore - Use the paths-ignore filter when you only need to exclude path names.
* - paths - Use the paths filter when you need to filter paths for positive matches and exclude paths.
*
* @minItems 1
*/
export type Path = [string, ...string[]];
/**
* Runs your workflow anytime a package is published or updated. For more information, see https://help.github.com/en/github/managing-packages-with-github-packages.
*/
export type EventObject16 = {
types?: Types18;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types18 = ["published" | "updated", ...("published" | "updated")[]];
/**
* Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/ in the GitHub Developer documentation.
*/
export type EventObject17 = {
types?: Types19;
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types19 = [
(
| "published"
| "unpublished"
| "created"
| "edited"
| "deleted"
| "prereleased"
| "released"
),
...(
| "published"
| "unpublished"
| "created"
| "edited"
| "deleted"
| "prereleased"
| "released"
)[],
];
/**
* This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. For example, if your pull_request workflow generates build artifacts, you can create a new workflow that uses workflow_run to analyze the results and add a comment to the original pull request.
*/
export type EventObject18 = {
types?: Types20;
/**
* @minItems 1
*/
workflows?: [string, ...string[]];
[k: string]: unknown | undefined;
} & ({
[k: string]: unknown | undefined;
} | null);
/**
* Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.
* You can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.
*
* @minItems 1
*/
export type Types20 = [
"requested" | "completed",
...("requested" | "completed")[],
];
export type StringContainingExpressionSyntax = string;
/**
* You can override the default shell settings in the runner's operating system using the shell keyword. You can use built-in shell keywords, or you can define a custom set of shell options.
*/
export type Shell =
| string
| ("bash" | "pwsh" | "python" | "sh" | "cmd" | "powershell");
/**
* Using the working-directory keyword, you can specify the working directory of where to run the command.
*/
export type WorkingDirectory = string;
export type ExpressionSyntax = string;
/**
* Identifies any jobs that must complete successfully before this job will run. It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional statement that causes the job to continue.
*/
export type JobNeeds = [Name, ...Name[]] | Name;
export type Name = string;
/**
* You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access.
*/
export type Permissions = ("read-all" | "write-all") | PermissionsEvent;
export type PermissionsLevel = "read" | "write" | "none";
/**
* To set custom environment variables, you need to specify the variables in the workflow file. You can define environment variables for a step, job, or entire workflow using the jobs.<job_id>.steps[*].env, jobs.<job_id>.env, and env keywords. For more information, see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv
*/
export type Env = {
args?: string;
entrypoint?: string;
[k: string]: unknown | undefined;
} & (
| {
[k: string]: (string | number | boolean) | undefined;
}
| StringContainingExpressionSyntax
);
/**
* A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.
* You can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.
* When you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.
*/
export type Matrix =
| {
[k: string]: unknown | undefined;
}
| ExpressionSyntax;
/**
* To set custom environment variables, you need to specify the variables in the workflow file. You can define environment variables for a step, job, or entire workflow using the jobs.<job_id>.steps[*].env, jobs.<job_id>.env, and env keywords. For more information, see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv
*/
export type Env1 =
| {
[k: string]: (string | number | boolean) | undefined;
}
| StringContainingExpressionSyntax;
export interface GitHubActionsWorkflowConfig {
/**
* The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. If you omit this field, GitHub sets the name to the workflow's filename.
*/
name?: string;
/**
* The name of the GitHub event that triggers the workflow. You can provide a single event string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.
*/
on:
| Event
| [Event, ...Event[]]
| {
branch_protection_rule?: EventObject;
check_run?: EventObject1;
check_suite?: EventObject2;
/**
* Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference.
*/
create?: {
[k: string]: unknown | undefined;
} | null;
/**
* Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference.
*/
delete?: {
[k: string]: unknown | undefined;
} | null;
/**
* Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/.
*/
deployment?: {
[k: string]: unknown | undefined;
} | null;
/**
* Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status.
*/
deployment_status?: {
[k: string]: unknown | undefined;
} | null;
discussion?: EventObject3;
discussion_comment?: EventObject4;
/**
* Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork.
*/
fork?: {
[k: string]: unknown | undefined;
} | null;
/**
* Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event.
*/
gollum?: {
[k: string]: unknown | undefined;
} | null;
issue_comment?: EventObject5;
issues?: EventObject6;
label?: EventObject7;
member?: EventObject8;
merge_group?: EventObject9;
milestone?: EventObject10;
/**
* Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/.
*/
page_build?: {
[k: string]: unknown | undefined;
} | null;
project?: EventObject11;
project_card?: EventObject12;
project_column?: EventObject13;
/**
* Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit.
*/
public?: {
[k: string]: unknown | undefined;
} | null;
pull_request?: Ref;
pull_request_review?: EventObject14;
pull_request_review_comment?: EventObject15;
pull_request_target?: Ref1;
push?: Ref2;
registry_package?: EventObject16;
release?: EventObject17;
/**
* Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/.
*/
status?: {
[k: string]: unknown | undefined;
} | null;
/**
* Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/.
*/
watch?: {
[k: string]: unknown | undefined;
} | null;
/**
* Allows workflows to be reused by other workflows.
*/
workflow_call?: {
/**
* When using the workflow_call keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow.
*/
inputs?: {
/**
* A string identifier to associate with the input. The value of <input_id> is a map of the input's metadata. The <input_id> must be a unique identifier within the inputs object. The <input_id> must start with a letter or _ and contain only alphanumeric characters, -, or _.
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[_a-zA-Z][a-zA-Z0-9_-]*$".
*/
[k: string]:
| {
/**
* A string description of the input parameter.
*/
description?: string;
/**
* A string shown to users using the deprecated input.
*/
deprecationMessage?: string;
/**
* A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.
*/
required?: boolean;
/**
* Required if input is defined for the on.workflow_call keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: boolean, number, or string.
*/
type: "boolean" | "number" | "string";
/**
* The default value is used when an input parameter isn't specified in a workflow file.
*/
default?: boolean | number | string;
}
| undefined;
};
/**
* A map of the secrets that can be used in the called workflow. Within the called workflow, you can use the secrets context to refer to a secret.
*/
secrets?: {
/**
* A string identifier to associate with the secret.
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[_a-zA-Z][a-zA-Z0-9_-]*$".
*/
[k: string]:
| {
/**
* A string description of the secret parameter.
*/
description?: string;
/**
* A boolean specifying whether the secret must be supplied.
*/
required: boolean;
}
| undefined;
};
[k: string]: unknown | undefined;
};
/**
* You can now create workflows that are manually triggered with the new workflow_dispatch event. You will then see a 'Run workflow' button on the Actions tab, enabling you to easily trigger a run.
*/
workflow_dispatch?: {
/**
* Input parameters allow you to specify data that the action expects to use during runtime. GitHub stores input parameters as environment variables. Input ids with uppercase letters are converted to lowercase during runtime. We recommended using lowercase input ids.
*/
inputs?: {
/**
* A string identifier to associate with the input. The value of <input_id> is a map of the input's metadata. The <input_id> must be a unique identifier within the inputs object. The <input_id> must start with a letter or _ and contain only alphanumeric characters, -, or _.
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[_a-zA-Z][a-zA-Z0-9_-]*$".
*/
[k: string]:
| {
[k: string]: unknown | undefined;
}
| undefined;
};
[k: string]: unknown | undefined;
};
workflow_run?: EventObject18;
/**
* You can use the GitHub API to trigger a webhook event called repository_dispatch when you want to trigger a workflow for activity that happens outside of GitHub. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.
* To trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event.
*/
repository_dispatch?: {
[k: string]: unknown | undefined;
} | null;
/**
* You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.
* Note: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot.
* You can use crontab guru (https://crontab.guru/). to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html).
*
* @minItems 1
*/
schedule?: [
{
cron?: string;
},
...{
cron?: string;
}[],
];
};
/**
* To set custom environment variables, you need to specify the variables in the workflow file. You can define environment variables for a step, job, or entire workflow using the jobs.<job_id>.steps[*].env, jobs.<job_id>.env, and env keywords. For more information, see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv
*/
env?:
| {
[k: string]: (string | number | boolean) | undefined;
}
| StringContainingExpressionSyntax;
defaults?: Defaults;
/**
* Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression. The expression can use any context except for the secrets context.
* You can also specify concurrency at the workflow level.
* When a concurrent job or workflow is queued, if another job or workflow using the same concurrency group in the repository is in progress, the queued job or workflow will be pending. Any previously pending job or workflow in the concurrency group will be canceled. To also cancel any currently running job or workflow in the same concurrency group, specify cancel-in-progress: true.
*/
concurrency?: string | Concurrency;
/**
* A workflow run is made up of one or more jobs. Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs.<job_id>.needs keyword.
* Each job runs in a fresh instance of the virtual environment specified by runs-on.
* You can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits.
*/
jobs: {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[_a-zA-Z][a-zA-Z0-9_-]*$".
*/
[k: string]: (NormalJob | ReusableWorkflowCallJob) | undefined;
};
/**
* The name for workflow runs generated from the workflow. GitHub displays the workflow run name in the list of workflow runs on your repository's 'Actions' tab.
*/
"run-name"?: string;
permissions?: Permissions;
}
/**
* A map of default settings that will apply to all jobs in the workflow.
*/
export interface Defaults {
run?: {
shell?: Shell;
"working-directory"?: WorkingDirectory;
};
}
export interface Concurrency {
/**
* When a concurrent job or workflow is queued, if another job or workflow using the same concurrency group in the repository is in progress, the queued job or workflow will be pending. Any previously pending job or workflow in the concurrency group will be canceled.
*/
group: string;
/**
* To cancel any currently running job or workflow in the same concurrency group, specify cancel-in-progress: true.
*/
"cancel-in-progress"?: boolean | ExpressionSyntax;
}
/**
* Each job must have an id to associate with the job. The key job_id is a string and its value is a map of the job's configuration data. You must replace <job_id> with a string that is unique to the jobs object. The <job_id> must start with a letter or _ and contain only alphanumeric characters, -, or _.
*/
export interface NormalJob {
/**
* The name of the job displayed on GitHub.
*/
name?: string;
needs?: JobNeeds;
permissions?: Permissions;
/**
* The type of machine to run the job on. The machine can be either a GitHub-hosted runner, or a self-hosted runner.
*/
"runs-on":
| string
| ([string] & unknown[])
| {
group?: string;
labels?: string | string[];
[k: string]: unknown | undefined;
}
| StringContainingExpressionSyntax
| ExpressionSyntax;
/**
* The environment that the job references.
*/
environment?: string | Environment;
/**
* A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.
*/
outputs?: {
[k: string]: string | undefined;
};
/**
* To set custom environment variables, you need to specify the variables in the workflow file. You can define environment variables for a step, job, or entire workflow using the jobs.<job_id>.steps[*].env, jobs.<job_id>.env, and env keywords. For more information, see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv
*/
env?:
| {
[k: string]: (string | number | boolean) | undefined;