githubnext / githubnext/gh-aw-test
Suggested test: copilot/dispatch-workflow-issue-comment-ref-resolution
- 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#56266 — Fixes a bug where `dispatch-workflow` refs omitted on PR-triggered `issue_comment` events resolved to the default branch instead of the PR head, dispatching CI against unrelated code and bypassing `allowed-refs`.
## Proposed test
- **Workflow file**: `test-copilot-dispatch-workflow-issue-comment-ref.md`
- **Trigger**: `workflow_dispatch` (simulating the resolution logic directly, since the harness cannot generate a real `issue_comment` trigger with a PR context)
- **Engine**: copilot
- **Safe output**: `dispatch-workflow`
- **Variant**: standard
## Minimal test prompt sketch
Have the agent call `dispatch-workflow` with the `ref` field omitted, targeting a companion test workflow, and assert (via a follow-up step reading the dispatched run's ref) that it resolved to the PR head SHA/ref rather than the default branch, and that `allowed-refs` enforcement rejected an explicit out-of-list ref.
## New fixtures or secrets needed
Possibly none, but faithfully reproducing the `issue_comment` + PR-head-context scenario via `workflow_dispatch` is non-trivial — the harness only supports `workflow_dispatch` triggers, so an open question is whether this fix can be exercised without a real PR-comment trigger. May need to simulate by checking out a PR-like ref manually and passing it through inputs.
## Notes
Existing open suggestion #10528 ("dispatch-workflow-ref-override") covers a different scenario (explicit ref override), so this is not a duplicate. This test's feasibility hinges on whether the harness can approximate an `issue_comment`-on-PR trigger context via `workflow_dispatch` inputs; flagging for triage.
> Generated by [🔍 Suggest New E2E Tests](https://github.com/githubnext/gh-aw-test/actions/runs/33069532809) · copilot · auto · 21.8 AIC · ⌖ 5.2 AIC · ⊞ 8.8K · [◷](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 examining the existing workflow_dispatch-based test harness and the workflow file named test-copilot-dispatch-workflow-issue-comment-ref.md. Determine whether PR-head context and allowed-refs behavior can be simulated through workflow_dispatch inputs, then add the test only if the scenario is reproducible. Done means the omitted ref resolves to the PR head and an explicit out-of-list ref is rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100