Skip to content

repo-assist: allow direct task invocation via gh aw run -F command=...#330

Merged
dsyme merged 5 commits intomainfrom
copilot/add-support-for-invoking-tasks
May 9, 2026
Merged

repo-assist: allow direct task invocation via gh aw run -F command=...#330
dsyme merged 5 commits intomainfrom
copilot/add-support-for-invoking-tasks

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

New Feature

Repo Assist command mode previously only read slash-command text, so predefined tasks could not be invoked directly from gh aw run fields. This change adds a CLI input path so task instructions can be passed as workflow input.

What does this feature do?

  • Workflow input fallback

    • Updates Repo Assist command-mode instructions to read:
      • slash command text first (steps.sanitized.outputs.text)
      • then manual dispatch input (inputs.command) as fallback
    • This enables direct invocations like “Run Task 9” from gh aw run.
  • Declared manual-dispatch input

    • Adds workflow_dispatch.inputs.command as an optional string input in workflows/repo-assist.md.
    • This ensures -F command="..." is a declared workflow input for manual runs.
  • User-facing docs

    • Adds a concrete CLI example showing how to pass command text via raw field input.

Why is this feature needed?

gh aw run supports key/value inputs (-F), and Repo Assist should accept those values for command mode to make predefined task execution available from CLI-triggered runs.

Implementation details

on:
  workflow_dispatch:
    inputs:
      command:
        required: false
        type: string
        default: ""
Take heed of **instructions**: "${{ steps.sanitized.outputs.text || inputs.command }}"
gh aw run repo-assist --repo <owner>/<repo> -F command="Run Task 9"

Copilot AI and others added 2 commits May 8, 2026 20:54
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for invoking predefined tasks from command line repo-assist: allow direct task invocation via gh aw run -F command=... May 8, 2026
Copilot finished work on behalf of dsyme May 8, 2026 20:56
Copilot AI requested a review from dsyme May 8, 2026 20:56
Comment thread workflows/repo-assist.md
## Command Mode

Take heed of **instructions**: "${{ steps.sanitized.outputs.text }}"
Take heed of **instructions**: "${{ steps.sanitized.outputs.text || inputs.command }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command must be declared as an optional input to the workflow_dispatch trigger, see gh-aw docs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot The command must be declared as an optional input to the workflow_dispatch trigger, see gh-aw docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cd28e55 by declaring workflow_dispatch.inputs.command as an optional string input in workflows/repo-assist.md.

Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Copilot finished work on behalf of dsyme May 8, 2026 23:33
Copilot AI requested a review from dsyme May 8, 2026 23:33
Updated instructions for Command Mode to clarify user-triggered actions.
@dsyme dsyme marked this pull request as ready for review May 9, 2026 12:20
@dsyme dsyme merged commit c7d030c into main May 9, 2026
1 check passed
@dsyme dsyme deleted the copilot/add-support-for-invoking-tasks branch May 9, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo assist - Allow tasks 1 - 10 to be invoked directly from the gh aw command line

2 participants