githubnext / githubnext/gh-aw-test
Suggested test: copilot/add-discussion-comment-dispatch
- 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#47722 — fix `add_comment` failures for discussion targeting and `workflow_dispatch` PR context.
The fix resolved two root causes: (1) `discussions: true` was absent from the `add-comment` config, causing the token to lack `discussions:write`; (2) the agent was using the wrong context when triggered via `workflow_dispatch` to post a comment on a discussion. The existing `test-copilot-add-discussion-comment` test only uses a `discussion:` trigger, so the `workflow_dispatch` + explicit discussion number path is untested.
## Proposed test
- **Workflow file**: `test-copilot-add-discussion-comment-dispatch.md`
- **Trigger**: `workflow_dispatch` (with a `discussion_number` input)
- **Engine**: copilot
- **Safe output**: `add-comment` (with `discussions: true`)
- **Variant**: standard
## Minimal test prompt sketch
The agent receives a discussion number via `workflow_dispatch` input. It posts a comment on that discussion using `add_comment` with the discussions permission. The test asserts the comment was created and validates that `discussions: true` in the safe-output config is honoured.
## New fixtures or secrets needed
None. `githubnext/gh-aw-test` already has open discussions that can serve as the target (the harness can create one or reuse an existing fixture discussion).
## Notes
The existing `test-copilot-add-discussion-comment` exercises the same safe output but via a `discussion:` event trigger. This test specifically covers the `workflow_dispatch` path that was broken before PR #47722.
> Generated by [🔍 Suggest New E2E Tests](https://github.com/githubnext/gh-aw-test/actions/runs/30152285891) · sonnet46 · 32.7 AIC · ⌖ 8.96 AIC · ⊞ 6.1K · [◷](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
Create test-copilot-add-discussion-comment-dispatch.md, following the existing test-copilot-add-discussion-comment workflow. Use a workflow_dispatch trigger with a discussion_number input and the copilot engine, then verify the add_comment output creates a discussion comment and honors discussions: true. Use an open discussion in githubnext/gh-aw-test as the target; 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