Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

The run command lacked support for passing workflow inputs when triggering workflows with workflow_dispatch. Users could not set input values without manually invoking gh workflow run directly.

Changes

  • Flag: Added --raw-field / -f StringArray flag accepting key=value format (matching gh workflow run argument names)
  • Validation: Early validation ensures format correctness and non-empty keys before workflow resolution
  • Integration: Converts inputs to -f key=value arguments passed to gh workflow run
  • Error handling: Clear error messages for malformed inputs (invalid input format or key cannot be empty)

Usage

# Single input
gh aw run my-workflow -f environment=production

# Multiple inputs
gh aw run my-workflow -f version=2.0.0 -f tag=v2.0.0 -f dry_run=false

# Combined with existing flags
gh aw run my-workflow --ref main -f deploy_env=staging --verbose

Verbose output shows generated command:

Executing: gh workflow run my-workflow.lock.yml --ref main -f version=2.0.0 -f tag=v2.0.0

[!WARNING]

Original prompt

Add support for setting input values when running a workflow using the "run" command using the "--input" flag

gh run .. --input name value

Short name is -i


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Changeset

  • Type: patch
  • Description: Added support for passing workflow inputs to gh aw run via the new --raw-field (-f) flag; accepts key=value pairs and validates formatting. This forwards inputs to gh workflow run as -f key=value arguments.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 3 commits December 10, 2025 07:01
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Contributor

@copilot use same argument names as gh workflow run

Copilot AI changed the title [WIP] Add support for setting input values in run command Add --input flag to run command for workflow_dispatch inputs Dec 10, 2025
Copilot AI requested a review from pelikhan December 10, 2025 07:18
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 10, 2025

@copilot use same argument names as gh workflow run

Changed to use --raw-field / -f to match gh workflow run argument names in commit 1c46fc9.

The flag now accepts the same format as the GitHub CLI:

gh aw run workflow -f key=value -f env=prod

Help output shows the updated flag:

-f, --raw-field stringArray   Add a string parameter in key=value format (can be used multiple times)

Copilot AI changed the title Add --input flag to run command for workflow_dispatch inputs Add --raw-field flag to run command for workflow_dispatch inputs Dec 10, 2025
@pelikhan pelikhan marked this pull request as ready for review December 10, 2025 11:57
@pelikhan pelikhan added the smoke label Dec 10, 2025
@github-actions
Copy link
Contributor

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

https://github.com/githubnext/gh-aw/tree/copilot/add-input-support-to-workflow

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot Playwright is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

📰🚀🔍👀📡🕵️ https://github.com/githubnext/gh-aw/actions/runs/20097778037

@github-actions
Copy link
Contributor

Smoke Test Results - Claude (Sonnet 4.5)

Recent PRs:

Test Results:
✅ GitHub MCP (2 PRs fetched)
✅ File Writing (/tmp/gh-aw/agent/)
✅ Bash Tool (verified files)
✅ Playwright (GitHub page loaded, title confirmed)
✅ Cache Memory (/tmp/gh-aw/cache-memory/)
❌ Safe Input gh Tool (not tested - tool not available)

Status: PASS (5/6 core tests passed)

💥 [THE END] — Illustrated by Smoke Claude fer issue #6000 🗺️

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs:

✅ GitHub MCP Testing
✅ File Writing Testing
✅ Bash Tool Testing
✅ Default Toolset Validation (get_me correctly unavailable)
✅ Cache Memory Testing

Status: PASS

📰 BREAKING: Report filed by Smoke Copilot fer issue #6000 🗺️

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs: ❌ (safeinputs-gh tool HTTP/HTTPS error)
File Writing: ✅
Bash Tool: ✅
Serena MCP: ❌ (not available in this workflow)
Safe Input gh Tool: ❌ (HTTP/HTTPS configuration issue)

Overall Status: ❌ FAIL

Test file created: /tmp/gh-aw/agent/smoke-test-copilot-20097778037.txt

📰🔥📋 https://github.com/githubnext/gh-aw/actions/runs/20097778037 fer issue #6000 🗺️

@github-actions
Copy link
Contributor

Smoke Test Results - Run 20097778036

Playwright MCP: Page loaded, title verified: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub"
Cache Memory: File created and verified at /tmp/gh-aw/cache-memory/smoke-test-20097778036.txt
Safe Input gh Tool: Failed - HTTP protocol error (http: server gave HTTP response to HTTPS client)

Overall Status: FAIL (1 of 3 tests failed)

📰 BREAKING: Report filed by Smoke Copilot Playwright fer issue #6000 🗺️

@github-actions
Copy link
Contributor

PRs reviewed:

  • Update portfolio-analyst workflow to use real data from gh aw logs
  • [specs] Update layout specification - 2025-12-10
    Tests:
  • Filesystem/cache writes/read ✅
  • Playwright GitHub title ✅
  • safeinputs-gh (gh issues list --limit 3) ❌ command not found
    Overall: FAIL

🔮 The oracle has spoken through Smoke Codex fer issue #6000 🗺️

@pelikhan pelikhan merged commit 14b70a9 into main Dec 10, 2025
15 of 16 checks passed
@pelikhan pelikhan deleted the copilot/add-input-support-to-workflow branch December 10, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants