githubnext / githubnext/gh-aw-test
Suggested test: copilot/close-issue-state-reason-list
- Dominant language
- Shell
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
Link to the gh-aw PR: github/gh-aw#47045 — Allow close_issue agents to choose state-reason at runtime
Previously `state-reason` in the `close-issue` safe-output config was scalar-only; the agent could not choose at runtime. This PR adds two new config modes: omitted (agent picks from `completed`, `not_planned`, `duplicate`) and list form (agent picks from a declared subset). No E2E test covers the list-form config or the omitted/agent-choice path.
## Proposed test
- **Workflow file**: `test-copilot-close-issue-state-reason-list.md`
- **Trigger**: `workflow_dispatch`
- **Engine**: copilot
- **Safe output**: `close-issue`
- **Variant**: standard
## Minimal test prompt sketch
Dispatch a workflow with `state-reason: [not_planned, duplicate]` in the close-issue frontmatter config. The prompt tells the agent the issue is a duplicate and to close it accordingly. Verify that `close-issue` is emitted with `state-reason: duplicate`.
## New fixtures or secrets needed
None. The test can create and close a scratch issue within `githubnext/gh-aw-test`, or target the triggering issue.
## Notes
Existing `test-copilot-close-issue.md` uses a fixed scalar `state-reason: not_planned`. Open suggestion #5447 covers duplicate-only detection but predates the list-config form. This test is distinct: it validates the new list-form config key and the agent runtime selection within a bounded set. A `samples:` block can declare `state-reason: duplicate` deterministically.
> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `awmgmcpg`
>> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "awmgmcpg"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>
> Generated by [🔍 Suggest New E2E Tests](https://github.com/githubnext/gh-aw-test/actions/runs/29907300322) · 24.9 AIC · ⌖ 5.62 AIC · ⊞ 5.6K · [◷](https://github.com/search?q=repo%3Agithubnext%2Fgh-aw-test+is%3Aissue+%22gh-aw-workflow-call-id%3A+githubnext%2Fgh-aw-test%2Fsuggest-new-e2e-tests%22&type=issues)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing test-copilot-close-issue.md with the proposed test-copilot-close-issue-state-reason-list.md workflow. Add a workflow_dispatch E2E case using the close-issue safe output with state-reason: [not_planned, duplicate], and use the suggested samples block for a deterministic duplicate selection. Done means the workflow emits close-issue with state-reason: duplicate; no new fixtures or secrets are needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100