From 722a36831dd1597652636e36a3ff05e7cecc1bee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 22:36:43 +0000 Subject: [PATCH 1/3] Initial plan From 1ae401e7fe8cf668511a989ed418fbf5073b6396 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 22:47:37 +0000 Subject: [PATCH 2/3] Add examples for safe-outputs configuration in schema - Add 3 examples for create-issue (with title-prefix, labels, assignees, and min) - Add 3 examples for create-discussion (with category, title-prefix, and max) - Add 2 examples for add-comment (with max and target properties) - Add 2 examples for create-pull-request (with title-prefix, labels, reviewers, draft) - Add examples for staged property (true/false) - Add 3 examples for github-token global config All examples extracted from real workflows: - smoke-claude.md (staged: true, min: 1) - audit-workflows.md (category: "audits") - copilot-agent-analysis.md (title-prefix, category, max) - dev-hawk.md (max: 1, target: "*") - daily-doc-updater.md (title-prefix, labels, reviewers, draft) - security-fix-pr.md (title-prefix, labels, reviewers) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/parser/schemas/main_workflow_schema.json | 68 ++++++++++++++++++-- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/pkg/parser/schemas/main_workflow_schema.json b/pkg/parser/schemas/main_workflow_schema.json index b3758adcadf..346b3e7e25f 100644 --- a/pkg/parser/schemas/main_workflow_schema.json +++ b/pkg/parser/schemas/main_workflow_schema.json @@ -2077,7 +2077,22 @@ "description": "GitHub token to use for this specific output type. Overrides global github-token if specified." } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "title-prefix": "[ca] ", + "labels": ["automation", "dependencies"], + "assignees": "copilot" + }, + { + "title-prefix": "[duplicate-code] ", + "labels": ["code-quality", "automated-analysis"], + "assignees": "copilot" + }, + { + "min": 1 + } + ] }, { "type": "null", @@ -2168,7 +2183,20 @@ "description": "GitHub token to use for this specific output type. Overrides global github-token if specified." } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "category": "audits" + }, + { + "title-prefix": "[copilot-agent-analysis] ", + "category": "audits", + "max": 1 + }, + { + "category": "General" + } + ] }, { "type": "null", @@ -2212,7 +2240,16 @@ "description": "Target discussion comments instead of issue/PR comments. Must be true if present." } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "max": 1, + "target": "*" + }, + { + "max": 3 + } + ] }, { "type": "null", @@ -2275,7 +2312,20 @@ "description": "GitHub token to use for this specific output type. Overrides global github-token if specified." } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "title-prefix": "[docs] ", + "labels": ["documentation", "automation"], + "reviewers": "copilot", + "draft": false + }, + { + "title-prefix": "[security-fix] ", + "labels": ["security", "automated-fix"], + "reviewers": "copilot" + } + ] }, { "type": "null", @@ -2599,7 +2649,8 @@ }, "staged": { "type": "boolean", - "description": "If true, emit step summary messages instead of making GitHub API calls (preview mode)" + "description": "If true, emit step summary messages instead of making GitHub API calls (preview mode)", + "examples": [true, false] }, "env": { "type": "object", @@ -2614,7 +2665,12 @@ }, "github-token": { "$ref": "#/$defs/github_token", - "description": "GitHub token to use for safe output jobs. Typically a secret reference like ${{ secrets.GITHUB_TOKEN }} or ${{ secrets.CUSTOM_PAT }}" + "description": "GitHub token to use for safe output jobs. Typically a secret reference like ${{ secrets.GITHUB_TOKEN }} or ${{ secrets.CUSTOM_PAT }}", + "examples": [ + "${{ secrets.GITHUB_TOKEN }}", + "${{ secrets.CUSTOM_PAT }}", + "${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}" + ] }, "max-patch-size": { "type": "integer", From 46f5971cb118d8ad66203282c14c51b4f7c8d3b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Oct 2025 23:00:42 +0000 Subject: [PATCH 3/3] chore: add changeset for safe-outputs schema examples [skip-ci] --- .changeset/patch-add-safe-outputs-schema-examples.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/patch-add-safe-outputs-schema-examples.md diff --git a/.changeset/patch-add-safe-outputs-schema-examples.md b/.changeset/patch-add-safe-outputs-schema-examples.md new file mode 100644 index 00000000000..1823529668b --- /dev/null +++ b/.changeset/patch-add-safe-outputs-schema-examples.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Add JSON schema examples for safe-outputs configuration