-
Notifications
You must be signed in to change notification settings - Fork 359
Expand file tree
/
Copy pathmain_workflow_schema.json
More file actions
10312 lines (10312 loc) · 478 KB
/
main_workflow_schema.json
File metadata and controls
10312 lines (10312 loc) · 478 KB
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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/github/gh-aw/schemas/main_workflow_schema.json",
"title": "GitHub Agentic Workflow Schema",
"description": "JSON Schema for validating agentic workflow frontmatter configuration",
"version": "1.0.0",
"type": "object",
"required": ["on"],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "Workflow name that appears in the GitHub Actions interface. If not specified, defaults to the filename without extension.",
"examples": ["Copilot Agent PR Analysis", "Dev Hawk", "Smoke Claude"]
},
"description": {
"type": "string",
"maxLength": 10000,
"description": "Optional workflow description that is rendered as a comment in the generated GitHub Actions YAML file (.lock.yml)",
"examples": ["Quickstart for using the GitHub Actions library"]
},
"source": {
"type": "string",
"description": "Optional source reference indicating where this workflow was added from. Format: owner/repo/path@ref (e.g., githubnext/agentics/workflows/ci-doctor.md@v1.0.0). Rendered as a comment in the generated lock file.",
"examples": ["githubnext/agentics/workflows/ci-doctor.md", "githubnext/agentics/workflows/daily-perf-improver.md@1f181b37d3fe5862ab590648f25a292e345b5de6"]
},
"tracker-id": {
"type": "string",
"minLength": 8,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9_-]+$",
"description": "Optional tracker identifier to tag all created assets (issues, discussions, comments, pull requests). Must be at least 8 characters and contain only alphanumeric characters, hyphens, and underscores. This identifier will be inserted in the body/description of all created assets to enable searching and retrieving assets associated with this workflow.",
"examples": ["workflow-2024-q1", "team-alpha-bot", "security_audit_v2"]
},
"labels": {
"type": "array",
"description": "Optional array of labels to categorize and organize workflows. Labels can be used to filter workflows in status/list commands.",
"items": {
"type": "string",
"minLength": 1
},
"examples": [
["automation", "security"],
["docs", "maintenance"],
["ci", "testing"]
]
},
"metadata": {
"type": "object",
"description": "Optional metadata field for storing custom key-value pairs compatible with the custom agent spec. Key names are limited to 64 characters, and values are limited to 1024 characters.",
"patternProperties": {
"^.{1,64}$": {
"type": "string",
"maxLength": 1024,
"description": "Metadata value (maximum 1024 characters)"
}
},
"additionalProperties": false,
"examples": [
{
"author": "John Doe",
"version": "1.0.0",
"category": "automation"
}
]
},
"imports": {
"description": "Workflow specifications to import. Supports array form (list of paths) or object form with 'aw' (agentic workflow paths) and 'apm-packages' (APM packages) subfields. Path resolution: (1) relative paths (e.g., 'shared/file.md') are resolved relative to the workflow's directory; (2) paths starting with '.github/' or '/' are resolved from the repository root (repo-root-relative); (3) paths matching 'owner/repo/path@ref' are fetched from GitHub at compile time (cross-repo).",
"oneOf": [
{
"type": "array",
"description": "Array of workflow specifications to import. Three path formats are supported: relative paths ('shared/file.md'), repo-root-relative paths ('.github/agents/my-agent.md'), and cross-repo paths ('owner/repo/path@ref'). Any markdown files under .github/agents directory are treated as custom agent files and only one agent file is allowed per workflow.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Import path. Use 'shared/file.md' for paths relative to the workflow directory, '.github/agents/my-agent.md' for repo-root-relative paths, or 'owner/repo/path@ref' for cross-repo imports. Markdown files under .github/agents/ are treated as agent configuration files."
},
{
"type": "object",
"description": "Import specification with path and optional inputs",
"required": ["path"],
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "Import path. Use 'shared/file.md' for paths relative to the workflow directory, '.github/agents/my-agent.md' for repo-root-relative paths, or 'owner/repo/path@ref' for cross-repo imports. Markdown files under .github/agents/ are treated as agent configuration files."
},
"inputs": {
"type": "object",
"description": "Input values to pass to the imported workflow. Keys are input names declared in the imported workflow's inputs section, values can be strings or expressions.",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"description": "Object value for import-schema parameters of type 'object' (one level deep).",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
]
}
}
}
},
{
"type": "object",
"description": "Import specification with 'uses'/'with' syntax (mirrors GitHub Actions reusable workflow syntax). 'uses' references the workflow path and 'with' provides input values.",
"required": ["uses"],
"additionalProperties": false,
"properties": {
"uses": {
"type": "string",
"description": "Import path (alias for 'path'). Use 'shared/file.md' for paths relative to the workflow directory, '.github/agents/my-agent.md' for repo-root-relative paths, or 'owner/repo/path@ref' for cross-repo imports."
},
"with": {
"type": "object",
"description": "Input values to pass to the imported workflow, validated against the imported workflow's 'import-schema'. Alias for 'inputs'.",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"description": "Object value for import-schema parameters of type 'object' (one level deep).",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
},
{
"type": "array",
"description": "Array value for import-schema parameters of type 'array'.",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"description": "Object element in an array import parameter.",
"additionalProperties": true
}
]
}
}
]
}
}
}
}
]
}
},
{
"type": "object",
"description": "Object form of imports with 'aw' subfield for shared agentic workflow paths and 'apm-packages' subfield for APM packages.",
"additionalProperties": false,
"properties": {
"aw": {
"type": "array",
"description": "Array of shared agentic workflow specifications to import. Format: owner/repo/path@ref or relative paths.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Workflow specification in format owner/repo/path@ref. Markdown files under .github/agents/ are treated as agent configuration files."
},
{
"type": "object",
"description": "Import specification with path and optional inputs",
"required": ["path"],
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "Workflow specification in format owner/repo/path@ref."
},
"inputs": {
"type": "object",
"description": "Input values to pass to the imported workflow.",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"description": "Object value for import-schema parameters of type 'object' (one level deep).",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
]
}
}
}
},
{
"type": "object",
"description": "Import specification with 'uses'/'with' syntax.",
"required": ["uses"],
"additionalProperties": false,
"properties": {
"uses": {
"type": "string",
"description": "Workflow specification in format owner/repo/path@ref."
},
"with": {
"type": "object",
"description": "Input values to pass to the imported workflow.",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"description": "Object value for import-schema parameters of type 'object' (one level deep).",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
},
{
"type": "array",
"description": "Array value for import-schema parameters of type 'array'.",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"description": "Object element in an array import parameter.",
"additionalProperties": true
}
]
}
}
]
}
}
}
}
]
}
},
"apm-packages": {
"description": "APM package references to install. Supports array format (list of package slugs) or object format with packages and configuration fields. Replaces the top-level 'dependencies' field.",
"oneOf": [
{
"type": "array",
"description": "Simple array of APM package references.",
"items": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+/[a-zA-Z0-9_./-]+$",
"description": "APM package reference in the format 'org/repo' or 'org/repo/path/to/skill'"
}
},
{
"type": "object",
"description": "Object format with packages and optional configuration.",
"properties": {
"packages": {
"type": "array",
"description": "List of APM package references to install.",
"items": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+/[a-zA-Z0-9_./-]+$",
"description": "APM package reference in the format 'org/repo' or 'org/repo/path/to/skill'"
}
},
"isolated": {
"type": "boolean",
"description": "If true, agent restore step clears primitive dirs before unpacking."
},
"github-app": {
"$ref": "#/$defs/github_app",
"description": "GitHub App credentials for minting installation access tokens used by APM to access cross-org private repositories."
},
"env": {
"type": "object",
"description": "Environment variables to set on the APM pack step.",
"additionalProperties": {
"type": "string"
}
},
"github-token": {
"type": "string",
"description": "GitHub token expression to authenticate APM with private package repositories.",
"examples": ["${{ secrets.MY_TOKEN }}", "${{ secrets.GH_AW_GITHUB_TOKEN }}"]
}
},
"required": ["packages"],
"additionalProperties": false
}
]
}
}
}
],
"examples": [
["shared/jqschema.md", "shared/reporting.md"],
["shared/mcp/gh-aw.md", "shared/jqschema.md", "shared/reporting.md"],
["../instructions/documentation.instructions.md"],
[".github/agents/my-agent.md"],
[
{
"path": "shared/discussions-data-fetch.md",
"inputs": {
"count": 50
}
}
],
{
"aw": ["shared/common-tools.md", "shared/mcp/tavily.md"],
"apm-packages": ["microsoft/apm-sample-package"]
},
{
"apm-packages": {
"packages": ["microsoft/apm-sample-package"],
"github-app": {
"app-id": "${{ vars.APP_ID }}",
"private-key": "${{ secrets.APP_PRIVATE_KEY }}"
}
}
}
]
},
"resources": {
"type": "array",
"description": "Optional list of additional workflow or action files that should be fetched alongside this workflow when running 'gh aw add'. Entries are relative paths (from the same directory as this workflow in the source repository) to agentic workflow .md files or GitHub Actions .yml/.yaml files. GitHub Actions expression syntax (${{) is not allowed in resource paths.",
"items": {
"type": "string",
"description": "Relative path to a workflow .md file or action .yml/.yaml file. Must be a static path; GitHub Actions expression syntax (${{) is not allowed.",
"not": {
"pattern": "\\$\\{\\{"
}
},
"examples": [["triage-issue.md", "label-issue.md"], ["my-custom-action.yml"], ["shared/helper-action.yml", "close-stale.md"]]
},
"inlined-imports": {
"type": "boolean",
"default": false,
"description": "If true, inline all imports (including those without inputs) at compilation time in the generated lock.yml instead of using runtime-import macros. When enabled, the frontmatter hash covers the entire markdown body so any change to the content will invalidate the hash.",
"examples": [true, false]
},
"on": {
"description": "Workflow triggers that define when the agentic workflow should run. Supports standard GitHub Actions trigger events plus special command triggers for /commands (required)",
"examples": [
{
"issues": {
"types": ["opened"]
}
},
{
"pull_request": {
"types": ["opened", "synchronize"]
}
},
"workflow_dispatch",
{
"schedule": "daily at 9am"
},
"/my-bot"
],
"oneOf": [
{
"type": "string",
"minLength": 1,
"description": "Simple trigger event name (e.g., 'push', 'issues', 'pull_request', 'discussion', 'schedule', 'fork', 'create', 'delete', 'public', 'watch', 'workflow_call'), schedule shorthand (e.g., 'daily', 'weekly'), or slash command shorthand (e.g., '/my-bot' expands to slash_command + workflow_dispatch)",
"examples": ["push", "issues", "workflow_dispatch", "daily", "/my-bot"]
},
{
"type": "object",
"description": "Complex trigger configuration with event-specific filters and options",
"properties": {
"slash_command": {
"description": "Special slash command trigger for /command workflows (e.g., '/my-bot' in issue comments). Creates conditions to match slash commands automatically. Note: Can be combined with issues/pull_request events if those events only use 'labeled' or 'unlabeled' types.",
"oneOf": [
{
"type": "null",
"description": "Null command configuration - defaults to using the workflow filename (without .md extension) as the command name"
},
{
"type": "string",
"minLength": 1,
"pattern": "^[^/]",
"description": "Command name as a string (shorthand format, e.g., 'customname' for '/customname' triggers). Command names must not start with '/' as the slash is automatically added when matching commands."
},
{
"type": "object",
"description": "Command configuration object with custom command name",
"properties": {
"name": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^[^/]",
"description": "Single command name for slash commands (e.g., 'helper-bot' for '/helper-bot' triggers). Command names must not start with '/' as the slash is automatically added when matching commands. Defaults to workflow filename without .md extension if not specified."
},
{
"type": "array",
"minItems": 1,
"description": "Array of command names that trigger this workflow (e.g., ['cmd.add', 'cmd.remove'] for '/cmd.add' and '/cmd.remove' triggers). Each command name must not start with '/'.",
"items": {
"type": "string",
"minLength": 1,
"pattern": "^[^/]",
"description": "Command name without leading slash"
},
"maxItems": 25
}
],
"description": "Name of the slash command that triggers the workflow (e.g., '/help', '/analyze'). Used for comment-based workflow activation."
},
"events": {
"description": "Events where the command should be active. Default is all comment-related events ('*'). Use GitHub Actions event names.",
"oneOf": [
{
"type": "string",
"description": "Single event name or '*' for all events. Use GitHub Actions event names: 'issues', 'issue_comment', 'pull_request_comment', 'pull_request', 'pull_request_review_comment', 'discussion', 'discussion_comment'.",
"enum": ["*", "issues", "issue_comment", "pull_request_comment", "pull_request", "pull_request_review_comment", "discussion", "discussion_comment"]
},
{
"type": "array",
"minItems": 1,
"description": "Array of event names where the command should be active (requires at least one). Use GitHub Actions event names.",
"items": {
"type": "string",
"description": "GitHub Actions event name.",
"enum": ["*", "issues", "issue_comment", "pull_request_comment", "pull_request", "pull_request_review_comment", "discussion", "discussion_comment"]
},
"maxItems": 25
}
]
}
},
"additionalProperties": false
}
]
},
"command": {
"description": "DEPRECATED: Use 'slash_command' instead. Special command trigger for /command workflows (e.g., '/my-bot' in issue comments). Creates conditions to match slash commands automatically.",
"oneOf": [
{
"type": "null",
"description": "Null command configuration - defaults to using the workflow filename (without .md extension) as the command name"
},
{
"type": "string",
"minLength": 1,
"pattern": "^[^/]",
"description": "Command name as a string (shorthand format, e.g., 'customname' for '/customname' triggers). Command names must not start with '/' as the slash is automatically added when matching commands."
},
{
"type": "object",
"description": "Command configuration object with custom command name",
"properties": {
"name": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^[^/]",
"description": "Custom command name for slash commands (e.g., 'helper-bot' for '/helper-bot' triggers). Command names must not start with '/' as the slash is automatically added when matching commands. Defaults to workflow filename without .md extension if not specified."
},
{
"type": "array",
"minItems": 1,
"description": "Array of command names that trigger this workflow (e.g., ['cmd.add', 'cmd.remove'] for '/cmd.add' and '/cmd.remove' triggers). Each command name must not start with '/'.",
"items": {
"type": "string",
"minLength": 1,
"pattern": "^[^/]",
"description": "Command name without leading slash"
},
"maxItems": 25
}
],
"description": "Name of the slash command that triggers the workflow (e.g., '/deploy', '/test'). Used for command-based workflow activation."
},
"events": {
"description": "Events where the command should be active. Default is all comment-related events ('*'). Use GitHub Actions event names.",
"oneOf": [
{
"type": "string",
"description": "Single event name or '*' for all events. Use GitHub Actions event names: 'issues', 'issue_comment', 'pull_request_comment', 'pull_request', 'pull_request_review_comment', 'discussion', 'discussion_comment'.",
"enum": ["*", "issues", "issue_comment", "pull_request_comment", "pull_request", "pull_request_review_comment", "discussion", "discussion_comment"]
},
{
"type": "array",
"minItems": 1,
"description": "Array of event names where the command should be active (requires at least one). Use GitHub Actions event names.",
"items": {
"type": "string",
"description": "GitHub Actions event name.",
"enum": ["*", "issues", "issue_comment", "pull_request_comment", "pull_request", "pull_request_review_comment", "discussion", "discussion_comment"]
},
"maxItems": 25
}
]
}
},
"additionalProperties": false
}
]
},
"label_command": {
"description": "On Label Command trigger: fires when a specific label is added to an issue, pull request, or discussion. The triggering label is automatically removed at workflow start so it can be applied again to re-trigger. Use the 'events' field to restrict which item types (issues, pull_request, discussion) activate the trigger.",
"oneOf": [
{
"type": "string",
"minLength": 1,
"description": "Label name as a string (shorthand format). The workflow fires when this label is added to any supported item type (issue, pull request, or discussion)."
},
{
"type": "object",
"description": "Label command configuration object with label name(s) and optional event filtering.",
"properties": {
"name": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"description": "Single label name that acts as a command (e.g., 'deploy' triggers the workflow when the 'deploy' label is added)."
},
{
"type": "array",
"minItems": 1,
"description": "Array of label names \u2014 any of these labels will trigger the workflow.",
"items": {
"type": "string",
"minLength": 1,
"description": "A label name"
},
"maxItems": 25
}
],
"description": "Label name(s) that trigger the workflow when added to an issue, pull request, or discussion."
},
"names": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"description": "Single label name."
},
{
"type": "array",
"minItems": 1,
"description": "Array of label names \u2014 any of these labels will trigger the workflow.",
"items": {
"type": "string",
"minLength": 1,
"description": "A label name"
},
"maxItems": 25
}
],
"description": "Alternative to 'name': label name(s) that trigger the workflow."
},
"events": {
"description": "Item types where the label-command trigger should be active. Default is all supported types: issues, pull_request, discussion.",
"oneOf": [
{
"type": "string",
"description": "Single item type or '*' for all types.",
"enum": ["*", "issues", "pull_request", "discussion"]
},
{
"type": "array",
"minItems": 1,
"description": "Array of item types where the trigger is active.",
"items": {
"type": "string",
"description": "Item type.",
"enum": ["*", "issues", "pull_request", "discussion"]
},
"maxItems": 3
}
]
},
"remove_label": {
"type": "boolean",
"description": "Whether to automatically remove the triggering label after the workflow starts. Defaults to true. Set to false to keep the label on the item and skip the label-removal step. When false, the issues:write and discussions:write permissions required for label removal are also omitted."
}
},
"additionalProperties": false
}
]
},
"push": {
"description": "Push event trigger that runs the workflow when code is pushed to the repository",
"type": "object",
"additionalProperties": false,
"properties": {
"branches": {
"type": "array",
"$comment": "Mutually exclusive with branches-ignore. GitHub Actions requires only one to be specified.",
"description": "Branches to filter on",
"items": {
"type": "string"
}
},
"branches-ignore": {
"type": "array",
"$comment": "Mutually exclusive with branches. GitHub Actions requires only one to be specified.",
"description": "Branches to ignore",
"items": {
"type": "string"
}
},
"paths": {
"type": "array",
"$comment": "Mutually exclusive with paths-ignore. GitHub Actions requires only one to be specified.",
"description": "Paths to filter on",
"items": {
"type": "string"
}
},
"paths-ignore": {
"type": "array",
"$comment": "Mutually exclusive with paths. GitHub Actions requires only one to be specified.",
"description": "Paths to ignore",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"description": "List of git tag names or patterns to include for push events (supports wildcards)",
"items": {
"type": "string"
}
},
"tags-ignore": {
"type": "array",
"description": "List of git tag names or patterns to exclude from push events (supports wildcards)",
"items": {
"type": "string"
}
}
},
"oneOf": [
{
"required": ["branches"],
"not": {
"required": ["branches-ignore"]
}
},
{
"required": ["branches-ignore"],
"not": {
"required": ["branches"]
}
},
{
"not": {
"anyOf": [
{
"required": ["branches"]
},
{
"required": ["branches-ignore"]
}
]
}
}
],
"allOf": [
{
"oneOf": [
{
"required": ["paths"],
"not": {
"required": ["paths-ignore"]
}
},
{
"required": ["paths-ignore"],
"not": {
"required": ["paths"]
}
},
{
"not": {
"anyOf": [
{
"required": ["paths"]
},
{
"required": ["paths-ignore"]
}
]
}
}
]
}
]
},
"pull_request": {
"description": "Pull request event trigger that runs the workflow when pull requests are created, updated, or closed",
"type": "object",
"properties": {
"types": {
"type": "array",
"description": "Pull request event types to trigger on. Note: 'converted_to_draft' and 'ready_for_review' represent state transitions (events) rather than states. While technically valid to listen for both, consider if you need to handle both transitions or just one.",
"$comment": "converted_to_draft and ready_for_review are logically opposite state transitions. Using both may indicate unclear intent.",
"items": {
"type": "string",
"enum": [
"assigned",
"unassigned",
"labeled",
"unlabeled",
"opened",
"edited",
"closed",
"reopened",
"synchronize",
"converted_to_draft",
"locked",
"unlocked",
"enqueued",
"dequeued",
"milestoned",
"demilestoned",
"ready_for_review",
"review_requested",
"review_request_removed",
"auto_merge_enabled",
"auto_merge_disabled"
]
}
},
"branches": {
"type": "array",
"$comment": "Mutually exclusive with branches-ignore. GitHub Actions requires only one to be specified.",
"description": "Branches to filter on",
"items": {
"type": "string"
}
},
"branches-ignore": {
"type": "array",
"$comment": "Mutually exclusive with branches. GitHub Actions requires only one to be specified.",
"description": "Branches to ignore",
"items": {
"type": "string"
}
},
"paths": {
"type": "array",
"$comment": "Mutually exclusive with paths-ignore. GitHub Actions requires only one to be specified.",
"description": "Paths to filter on",
"items": {
"type": "string"
}
},
"paths-ignore": {
"type": "array",
"$comment": "Mutually exclusive with paths. GitHub Actions requires only one to be specified.",
"description": "Paths to ignore",
"items": {
"type": "string"
}
},
"draft": {
"type": "boolean",
"description": "Filter by draft pull request state. Set to false to exclude draft PRs, true to include only drafts, or omit to include both"
},
"forks": {
"oneOf": [
{
"type": "string",
"description": "Single fork pattern (e.g., '*' for all forks, 'org/*' for org glob, 'org/repo' for exact match)"
},
{
"type": "array",
"description": "List of allowed fork repositories with glob support (e.g., 'org/repo', 'org/*', '*' for all forks)",
"items": {
"type": "string",
"description": "Repository pattern with optional glob support"
}
}
],
"description": "When true, allows workflow to run on pull requests from forked repositories. Security consideration: fork PRs have limited permissions."
},
"names": {
"oneOf": [
{
"type": "string",
"description": "Single label name to filter labeled/unlabeled events (e.g., 'bug')"
},
{
"type": "array",
"description": "List of label names to filter labeled/unlabeled events. Only applies when 'labeled' or 'unlabeled' is in the types array",
"items": {
"type": "string",
"description": "Label name"
},
"minItems": 1,
"maxItems": 25
}
],
"description": "Array of pull request type names that trigger the workflow. Filters workflow execution to specific PR categories."
}
},
"additionalProperties": false,
"oneOf": [
{
"required": ["branches"],
"not": {
"required": ["branches-ignore"]
}
},
{
"required": ["branches-ignore"],
"not": {
"required": ["branches"]
}
},
{
"not": {
"anyOf": [
{
"required": ["branches"]
},
{
"required": ["branches-ignore"]
}
]
}
}
],
"allOf": [
{
"oneOf": [
{
"required": ["paths"],
"not": {
"required": ["paths-ignore"]
}
},
{
"required": ["paths-ignore"],
"not": {
"required": ["paths"]
}
},
{
"not": {
"anyOf": [
{
"required": ["paths"]
},
{
"required": ["paths-ignore"]
}
]
}
}
]
}
]
},
"issues": {
"description": "Issues event trigger that runs when repository issues are created, updated, or managed",
"type": "object",
"additionalProperties": false,
"properties": {
"types": {
"type": "array",
"description": "Types of issue events",
"items": {
"type": "string",
"enum": ["opened", "edited", "deleted", "transferred", "pinned", "unpinned", "closed", "reopened", "assigned", "unassigned", "labeled", "unlabeled", "locked", "unlocked", "milestoned", "demilestoned", "typed", "untyped"]
}
},
"names": {
"oneOf": [
{
"type": "string",
"description": "Single label name to filter labeled/unlabeled events (e.g., 'bug')"
},
{
"type": "array",
"description": "List of label names to filter labeled/unlabeled events. Only applies when 'labeled' or 'unlabeled' is in the types array",
"items": {
"type": "string",
"description": "Label name"
},
"minItems": 1,
"maxItems": 25
}
],
"description": "Array of issue type names that trigger the workflow. Filters workflow execution to specific issue categories."
},
"lock-for-agent": {
"type": "boolean",
"description": "Whether to lock the issue for the agent when the workflow runs (prevents concurrent modifications)"
}
}
},
"issue_comment": {
"description": "Issue comment event trigger",
"type": "object",
"additionalProperties": false,
"properties": {
"types": {
"type": "array",
"description": "Types of issue comment events",
"items": {
"type": "string",
"enum": ["created", "edited", "deleted"]
}
},
"lock-for-agent": {