From ef292fc20b90f22bef523751b81ad76342de3e80 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 16:26:58 +0000 Subject: [PATCH 1/3] Initial plan From 957f0b51d8cb491f2ab1030abb226497643cae21 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 16:33:46 +0000 Subject: [PATCH 2/3] Add test-dispatch-workflow and update smoke-copilot with workflow dispatch capability Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/smoke-copilot.lock.yml | 25 +++++++++++++++++--- .github/workflows/smoke-copilot.md | 5 ++++ .github/workflows/test-dispatch-workflow.yml | 22 +++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-dispatch-workflow.yml diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 6985e1375a..791cddce04 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -27,7 +27,7 @@ # - shared/github-queries-safe-input.md # - shared/reporting.md # -# frontmatter-hash: 93ac6babdb426bdd9ca113f8b067a10de4ef77737d5d1360c3fc4b568d853275 +# frontmatter-hash: cc656f1f9d1287597453c994ff2b1669f1266c16e79c976e8d0d6cbeeb75c504 name: "Smoke Copilot" "on": @@ -230,7 +230,7 @@ jobs: mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > /opt/gh-aw/safeoutputs/config.json << 'EOF' - {"add_comment":{"max":2},"add_labels":{"allowed":["smoke-copilot"],"max":3},"create_issue":{"expires":2,"group":true,"max":1},"missing_data":{},"missing_tool":{},"noop":{"max":1},"remove_labels":{"allowed":["smoke"],"max":3},"send-slack-message":{"description":"Send a message to Slack (stub for testing)","inputs":{"message":{"default":null,"description":"The message to send","required":true,"type":"string"}},"output":"Slack message stub executed!"}} + {"add_comment":{"max":2},"add_labels":{"allowed":["smoke-copilot"],"max":3},"create_issue":{"expires":2,"group":true,"max":1},"dispatch_workflow":{"max":1,"workflow_files":{"test-dispatch-workflow":".yml"},"workflows":["test-dispatch-workflow"]},"missing_data":{},"missing_tool":{},"noop":{"max":1},"remove_labels":{"allowed":["smoke"],"max":3},"send-slack-message":{"description":"Send a message to Slack (stub for testing)","inputs":{"message":{"default":null,"description":"The message to send","required":true,"type":"string"}},"output":"Slack message stub executed!"}} EOF cat > /opt/gh-aw/safeoutputs/tools.json << 'EOF' [ @@ -425,6 +425,24 @@ jobs: "type": "object" }, "name": "send_slack_message" + }, + { + "_workflow_name": "test-dispatch-workflow", + "description": "Dispatch the 'test-dispatch-workflow' workflow with workflow_dispatch trigger. This workflow must support workflow_dispatch and be in .github/workflows/ directory in the same repository.", + "inputSchema": { + "additionalProperties": false, + "properties": { + "message": { + "description": "Message to print", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "name": "test_dispatch_workflow" } ] EOF @@ -1850,6 +1868,7 @@ jobs: if: ((!cancelled()) && (needs.agent.result != 'skipped')) && (needs.detection.outputs.success == 'true') runs-on: ubuntu-slim permissions: + actions: write contents: read discussions: write issues: write @@ -1890,7 +1909,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":2},\"add_labels\":{\"allowed\":[\"smoke-copilot\"]},\"create_issue\":{\"close_older_issues\":true,\"expires\":2,\"group\":true,\"max\":1},\"missing_data\":{},\"missing_tool\":{},\"remove_labels\":{\"allowed\":[\"smoke\"]}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":2},\"add_labels\":{\"allowed\":[\"smoke-copilot\"]},\"create_issue\":{\"close_older_issues\":true,\"expires\":2,\"group\":true,\"max\":1},\"dispatch_workflow\":{\"max\":1,\"workflow_files\":{\"test-dispatch-workflow\":\".yml\"},\"workflows\":[\"test-dispatch-workflow\"]},\"missing_data\":{},\"missing_tool\":{},\"remove_labels\":{\"allowed\":[\"smoke\"]}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/smoke-copilot.md b/.github/workflows/smoke-copilot.md index d92fce0d06..3bea95baf6 100644 --- a/.github/workflows/smoke-copilot.md +++ b/.github/workflows/smoke-copilot.md @@ -57,6 +57,10 @@ safe-outputs: allowed: [smoke-copilot] remove-labels: allowed: [smoke] + dispatch-workflow: + workflows: + - test-dispatch-workflow + max: 1 jobs: send-slack-message: description: "Send a message to Slack (stub for testing)" @@ -110,6 +114,7 @@ strict: true - Extract the discussion number from the result (e.g., if the result is `{"number": 123, "title": "...", ...}`, extract 123) - Use the `add_comment` tool with `discussion_number: ` to add a fun, playful comment stating that the smoke test agent was here 8. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project (both caches must be set to /tmp because the default cache locations are not writable). If the command fails, mark this test as ❌ and report the failure. +9. **Workflow Dispatch Testing**: Use the `dispatch_workflow` safe output tool to trigger the `test-dispatch-workflow` workflow with a haiku as the message input. Create an original, creative haiku about software testing or automation. ## Output diff --git a/.github/workflows/test-dispatch-workflow.yml b/.github/workflows/test-dispatch-workflow.yml new file mode 100644 index 0000000000..099a7d6e79 --- /dev/null +++ b/.github/workflows/test-dispatch-workflow.yml @@ -0,0 +1,22 @@ +name: Test Dispatch Workflow +on: + workflow_dispatch: + inputs: + message: + description: 'Message to print' + type: string + required: true +permissions: + contents: read +jobs: + print-message: + runs-on: ubuntu-latest + steps: + - name: Print message + run: | + echo "📨 Received message:" + echo "${{ inputs.message }}" + echo "" + echo "### 📨 Message" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "${{ inputs.message }}" >> "$GITHUB_STEP_SUMMARY" From 47af60039396db128433af9904ed8dd5e1fcf48c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 17:04:23 +0000 Subject: [PATCH 3/3] Rename test-dispatch-workflow to haiku-printer Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- ...{test-dispatch-workflow.yml => haiku-printer.yml} | 2 +- .github/workflows/smoke-copilot.lock.yml | 12 ++++++------ .github/workflows/smoke-copilot.md | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) rename .github/workflows/{test-dispatch-workflow.yml => haiku-printer.yml} (94%) diff --git a/.github/workflows/test-dispatch-workflow.yml b/.github/workflows/haiku-printer.yml similarity index 94% rename from .github/workflows/test-dispatch-workflow.yml rename to .github/workflows/haiku-printer.yml index 099a7d6e79..523509c8b7 100644 --- a/.github/workflows/test-dispatch-workflow.yml +++ b/.github/workflows/haiku-printer.yml @@ -1,4 +1,4 @@ -name: Test Dispatch Workflow +name: Haiku Printer on: workflow_dispatch: inputs: diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 791cddce04..13d2b766a3 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -27,7 +27,7 @@ # - shared/github-queries-safe-input.md # - shared/reporting.md # -# frontmatter-hash: cc656f1f9d1287597453c994ff2b1669f1266c16e79c976e8d0d6cbeeb75c504 +# frontmatter-hash: 853d63d9ae25f0c3e9849d7264c0153f72a8b8754b6715f6c32ee2833234c175 name: "Smoke Copilot" "on": @@ -230,7 +230,7 @@ jobs: mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > /opt/gh-aw/safeoutputs/config.json << 'EOF' - {"add_comment":{"max":2},"add_labels":{"allowed":["smoke-copilot"],"max":3},"create_issue":{"expires":2,"group":true,"max":1},"dispatch_workflow":{"max":1,"workflow_files":{"test-dispatch-workflow":".yml"},"workflows":["test-dispatch-workflow"]},"missing_data":{},"missing_tool":{},"noop":{"max":1},"remove_labels":{"allowed":["smoke"],"max":3},"send-slack-message":{"description":"Send a message to Slack (stub for testing)","inputs":{"message":{"default":null,"description":"The message to send","required":true,"type":"string"}},"output":"Slack message stub executed!"}} + {"add_comment":{"max":2},"add_labels":{"allowed":["smoke-copilot"],"max":3},"create_issue":{"expires":2,"group":true,"max":1},"dispatch_workflow":{"max":1,"workflow_files":{"haiku-printer":".yml"},"workflows":["haiku-printer"]},"missing_data":{},"missing_tool":{},"noop":{"max":1},"remove_labels":{"allowed":["smoke"],"max":3},"send-slack-message":{"description":"Send a message to Slack (stub for testing)","inputs":{"message":{"default":null,"description":"The message to send","required":true,"type":"string"}},"output":"Slack message stub executed!"}} EOF cat > /opt/gh-aw/safeoutputs/tools.json << 'EOF' [ @@ -427,8 +427,8 @@ jobs: "name": "send_slack_message" }, { - "_workflow_name": "test-dispatch-workflow", - "description": "Dispatch the 'test-dispatch-workflow' workflow with workflow_dispatch trigger. This workflow must support workflow_dispatch and be in .github/workflows/ directory in the same repository.", + "_workflow_name": "haiku-printer", + "description": "Dispatch the 'haiku-printer' workflow with workflow_dispatch trigger. This workflow must support workflow_dispatch and be in .github/workflows/ directory in the same repository.", "inputSchema": { "additionalProperties": false, "properties": { @@ -442,7 +442,7 @@ jobs: ], "type": "object" }, - "name": "test_dispatch_workflow" + "name": "haiku_printer" } ] EOF @@ -1909,7 +1909,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":2},\"add_labels\":{\"allowed\":[\"smoke-copilot\"]},\"create_issue\":{\"close_older_issues\":true,\"expires\":2,\"group\":true,\"max\":1},\"dispatch_workflow\":{\"max\":1,\"workflow_files\":{\"test-dispatch-workflow\":\".yml\"},\"workflows\":[\"test-dispatch-workflow\"]},\"missing_data\":{},\"missing_tool\":{},\"remove_labels\":{\"allowed\":[\"smoke\"]}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":2},\"add_labels\":{\"allowed\":[\"smoke-copilot\"]},\"create_issue\":{\"close_older_issues\":true,\"expires\":2,\"group\":true,\"max\":1},\"dispatch_workflow\":{\"max\":1,\"workflow_files\":{\"haiku-printer\":\".yml\"},\"workflows\":[\"haiku-printer\"]},\"missing_data\":{},\"missing_tool\":{},\"remove_labels\":{\"allowed\":[\"smoke\"]}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/smoke-copilot.md b/.github/workflows/smoke-copilot.md index 3bea95baf6..c90e01e7ca 100644 --- a/.github/workflows/smoke-copilot.md +++ b/.github/workflows/smoke-copilot.md @@ -59,7 +59,7 @@ safe-outputs: allowed: [smoke] dispatch-workflow: workflows: - - test-dispatch-workflow + - haiku-printer max: 1 jobs: send-slack-message: @@ -114,7 +114,7 @@ strict: true - Extract the discussion number from the result (e.g., if the result is `{"number": 123, "title": "...", ...}`, extract 123) - Use the `add_comment` tool with `discussion_number: ` to add a fun, playful comment stating that the smoke test agent was here 8. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project (both caches must be set to /tmp because the default cache locations are not writable). If the command fails, mark this test as ❌ and report the failure. -9. **Workflow Dispatch Testing**: Use the `dispatch_workflow` safe output tool to trigger the `test-dispatch-workflow` workflow with a haiku as the message input. Create an original, creative haiku about software testing or automation. +9. **Workflow Dispatch Testing**: Use the `dispatch_workflow` safe output tool to trigger the `haiku-printer` workflow with a haiku as the message input. Create an original, creative haiku about software testing or automation. ## Output