Skip to content

Commit 54c1860

Browse files
docs(wizard): add trigger/safe-output catalog data for AW wizard
Populate docs/src/data/wizard-data-model.json, the runtime data source called out in the Wizard Data Model Specification (Section 3), mapping existing gh-aw trigger types and safe-outputs handlers into the shared WHAT -> WHEN -> WHERE catalog: - 6 goal categories (issue automation, PR review, scheduled report, slash command responder, discussion automation, CI triage) - 10 trigger options covering issues, issue_comment, pull_request, discussion, discussion_comment, workflow_run, slash_command, schedule (daily/weekly), and workflow_dispatch - 5 destination options mapped to existing safe-outputs handlers (add-comment, add-labels, close-issue, create-pull-request, create-discussion) with inferFromTriggerTypes hints All ids validated against the schema's id pattern and cross-referenced (goalCategory trigger/destination ids resolve, defaults are members of their option lists, trigger types are within the schema enum). Closes #53514 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fdbecfe commit 54c1860

1 file changed

Lines changed: 175 additions & 0 deletions

File tree

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"$schema": "https://docs.github.com/gh-aw/schemas/wizard-data-model.schema.json",
3+
"version": "1.0.0",
4+
"goalCategories": [
5+
{
6+
"id": "issue-automation",
7+
"text": {
8+
"label": "Automate issue triage or replies",
9+
"help": "Respond to, label, or triage issues automatically when they are opened or commented on."
10+
},
11+
"triggerOptionIds": ["on-issue-opened", "on-issue-comment", "slash-command", "manual-dispatch"],
12+
"destinationOptionIds": ["comment-on-issue", "add-labels-to-issue", "close-issue"],
13+
"defaultTriggerOptionId": "on-issue-opened",
14+
"defaultDestinationOptionId": "comment-on-issue"
15+
},
16+
{
17+
"id": "pr-review-assistant",
18+
"text": {
19+
"label": "Review pull requests automatically",
20+
"help": "Review incoming pull requests and leave feedback or suggested fixes."
21+
},
22+
"triggerOptionIds": ["on-pull-request", "slash-command", "manual-dispatch"],
23+
"destinationOptionIds": ["comment-on-issue", "open-pull-request"],
24+
"defaultTriggerOptionId": "on-pull-request",
25+
"defaultDestinationOptionId": "comment-on-issue"
26+
},
27+
{
28+
"id": "scheduled-report",
29+
"text": {
30+
"label": "Generate a recurring report",
31+
"help": "Run on a schedule and publish a summary, digest, or status report."
32+
},
33+
"triggerOptionIds": ["schedule-daily", "schedule-weekly", "manual-dispatch"],
34+
"destinationOptionIds": ["create-discussion", "open-pull-request", "comment-on-issue"],
35+
"defaultTriggerOptionId": "schedule-daily",
36+
"defaultDestinationOptionId": "create-discussion"
37+
},
38+
{
39+
"id": "command-responder",
40+
"text": {
41+
"label": "Respond to a slash command",
42+
"help": "Run on-demand when a user types a /command in an issue, PR, or discussion comment."
43+
},
44+
"triggerOptionIds": ["slash-command", "manual-dispatch"],
45+
"destinationOptionIds": ["comment-on-issue", "open-pull-request", "add-labels-to-issue"],
46+
"defaultTriggerOptionId": "slash-command",
47+
"defaultDestinationOptionId": "comment-on-issue"
48+
},
49+
{
50+
"id": "discussion-automation",
51+
"text": {
52+
"label": "Automate discussion replies",
53+
"help": "Respond to or summarize discussions automatically when they are created or commented on."
54+
},
55+
"triggerOptionIds": ["on-discussion-created", "on-discussion-comment", "slash-command", "manual-dispatch"],
56+
"destinationOptionIds": ["comment-on-issue", "create-discussion"],
57+
"defaultTriggerOptionId": "on-discussion-created",
58+
"defaultDestinationOptionId": "comment-on-issue"
59+
},
60+
{
61+
"id": "ci-triage",
62+
"text": {
63+
"label": "Triage CI failures",
64+
"help": "Investigate failed workflow runs and report findings or open a fix."
65+
},
66+
"triggerOptionIds": ["on-workflow-run", "manual-dispatch"],
67+
"destinationOptionIds": ["comment-on-issue", "open-pull-request", "create-discussion"],
68+
"defaultTriggerOptionId": "on-workflow-run",
69+
"defaultDestinationOptionId": "comment-on-issue"
70+
}
71+
],
72+
"triggerOptions": [
73+
{
74+
"id": "on-issue-opened",
75+
"type": "issues",
76+
"text": { "label": "When an issue is opened", "help": "Fires whenever a new issue is created." },
77+
"frontmatter": { "on": { "issues": { "types": ["opened"] } } }
78+
},
79+
{
80+
"id": "on-issue-comment",
81+
"type": "issue_comment",
82+
"text": { "label": "When someone comments on an issue" },
83+
"frontmatter": { "on": { "issue_comment": { "types": ["created"] } } }
84+
},
85+
{
86+
"id": "on-pull-request",
87+
"type": "pull_request",
88+
"text": { "label": "When a pull request is opened or updated" },
89+
"frontmatter": { "on": { "pull_request": { "types": ["opened", "synchronize"] } } }
90+
},
91+
{
92+
"id": "on-discussion-created",
93+
"type": "discussion",
94+
"text": { "label": "When a discussion is created" },
95+
"frontmatter": { "on": { "discussion": { "types": ["created"] } } }
96+
},
97+
{
98+
"id": "on-discussion-comment",
99+
"type": "issue_comment",
100+
"text": { "label": "When someone comments on a discussion" },
101+
"frontmatter": { "on": { "discussion_comment": { "types": ["created"] } } }
102+
},
103+
{
104+
"id": "on-workflow-run",
105+
"type": "other",
106+
"text": { "label": "When another workflow run completes", "help": "Fires after a monitored CI workflow run finishes." },
107+
"frontmatter": { "on": { "workflow_run": { "workflows": ["CI"], "types": ["completed"] } } }
108+
},
109+
{
110+
"id": "slash-command",
111+
"type": "slash_command",
112+
"text": { "label": "When triggered by a /command comment", "help": "Runs on-demand when a user comments a slash command." },
113+
"frontmatter": { "on": "/my-bot" }
114+
},
115+
{
116+
"id": "schedule-daily",
117+
"type": "schedule",
118+
"text": { "label": "Every day" },
119+
"frontmatter": { "on": { "schedule": "daily" } }
120+
},
121+
{
122+
"id": "schedule-weekly",
123+
"type": "schedule",
124+
"text": { "label": "Every week" },
125+
"frontmatter": { "on": { "schedule": "weekly" } }
126+
},
127+
{
128+
"id": "manual-dispatch",
129+
"type": "workflow_dispatch",
130+
"text": { "label": "Only when run manually" },
131+
"frontmatter": { "on": "workflow_dispatch" }
132+
}
133+
],
134+
"destinationOptions": [
135+
{
136+
"id": "comment-on-issue",
137+
"safeOutputType": "add-comment",
138+
"text": { "label": "Post a comment" },
139+
"inferFromTriggerTypes": ["issues", "issue_comment", "pull_request", "discussion", "slash_command", "other"]
140+
},
141+
{
142+
"id": "add-labels-to-issue",
143+
"safeOutputType": "add-labels",
144+
"text": { "label": "Add labels" },
145+
"inferFromTriggerTypes": ["issues", "slash_command"]
146+
},
147+
{
148+
"id": "close-issue",
149+
"safeOutputType": "close-issue",
150+
"text": { "label": "Close the issue with a comment" },
151+
"inferFromTriggerTypes": ["issues"]
152+
},
153+
{
154+
"id": "open-pull-request",
155+
"safeOutputType": "create-pull-request",
156+
"text": { "label": "Open a pull request" },
157+
"inferFromTriggerTypes": ["schedule", "pull_request", "workflow_dispatch", "other"]
158+
},
159+
{
160+
"id": "create-discussion",
161+
"safeOutputType": "create-discussion",
162+
"text": { "label": "Post a discussion" },
163+
"inferFromTriggerTypes": ["schedule", "workflow_dispatch", "discussion", "other"]
164+
}
165+
],
166+
"promptTemplate": {
167+
"introText": "You are helping generate a new GitHub Agentic Workflow (gh-aw) markdown file. This prompt is self-contained: run it in your project with an AI coding assistant and it will produce a complete `.md` workflow without assuming any prior gh-aw setup.",
168+
"sections": [
169+
{ "id": "goal", "heading": "Goal" },
170+
{ "id": "trigger", "heading": "Trigger" },
171+
{ "id": "destination", "heading": "Output destination" },
172+
{ "id": "task-details", "heading": "Task details" }
173+
]
174+
}
175+
}

0 commit comments

Comments
 (0)