Skip to content

Commit c7d030c

Browse files
Copilotdsyme
andauthored
repo-assist: allow direct task invocation via gh aw run -F command=... (#330)
* Initial plan * Plan repo-assist command input support Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> * Support repo-assist command input from gh aw run Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> * Declare optional workflow_dispatch command input for repo-assist Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> * Clarify user-triggered instructions in Command Mode Updated instructions for Command Mode to clarify user-triggered actions. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
1 parent 497230d commit c7d030c

7 files changed

Lines changed: 1210 additions & 2038 deletions

File tree

.github/workflows/daily-repo-goals.lock.yml

Lines changed: 255 additions & 426 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-workflow-sync.lock.yml

Lines changed: 253 additions & 421 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/import-workflow.lock.yml

Lines changed: 214 additions & 377 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/link-checker.lock.yml

Lines changed: 224 additions & 394 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/maintainer.lock.yml

Lines changed: 250 additions & 418 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/repo-assist.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ You can run Repo Assist in "blast mode" by repeatedly triggering:
143143
gh aw run repo-assist --repeat 30
144144
```
145145

146+
You can also invoke a predefined instruction directly from the command line:
147+
148+
```bash
149+
gh aw run repo-assist --repo <owner>/<repo> -F command="Run Task 9"
150+
```
151+
146152
### Usage as a General-Purpose Assistant
147153

148154
You can also trigger Repo Assist on-demand by commenting on any issue or PR:

workflows/repo-assist.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ description: |
1616
on:
1717
schedule: every 12h
1818
workflow_dispatch:
19+
inputs:
20+
command:
21+
description: "Optional command-mode instruction (for example: Run Task 9)"
22+
required: false
23+
type: string
24+
default: ""
1925
slash_command:
2026
name: repo-assist
2127
reaction: "eyes"
@@ -195,9 +201,9 @@ steps:
195201

196202
## Command Mode
197203

198-
Take heed of **instructions**: "${{ steps.sanitized.outputs.text }}"
204+
Take heed of **instructions**: "${{ steps.sanitized.outputs.text || inputs.command }}"
199205

200-
If these are non-empty (not ""), then you have been triggered via `/repo-assist <instructions>`. Follow the user's instructions instead of the normal scheduled workflow. Focus exclusively on those instructions. Apply all the same guidelines (read AGENTS.md, run formatters/linters/tests, be polite, use AI disclosure). Skip the weighted task selection and Task 11 reporting, and instead directly do what the user requested. If no specific instructions were provided (empty or blank), proceed with the normal scheduled workflow below.
206+
If these are non-empty (not ""), then you have been triggered via `/repo-assist <instructions>` (or by the user setting `inputs.command` in a manual `workflow_dispatch`). Follow the user's instructions instead of the normal scheduled workflow. Focus exclusively on those instructions. Apply all the same guidelines (read AGENTS.md, run formatters/linters/tests, be polite, use AI disclosure). Skip the weighted task selection and Task 11 reporting, and instead directly do what the user requested. If no specific instructions were provided (empty or blank), proceed with the normal scheduled workflow below.
201207

202208
Then exit - do not run the normal workflow after completing the instructions.
203209

0 commit comments

Comments
 (0)