Skip to content

Commit edcbb4e

Browse files
committed
feat: add close-issue, remove-labels, close-discussion, close-pull-request tests
New safe output coverage tests (copilot-only): - test-copilot-close-issue: close triggering issue - test-copilot-remove-labels: remove label from issue - test-copilot-close-discussion: close triggering discussion - test-copilot-close-pull-request: close triggering PR Also adds tracking checklist to README.
1 parent 98713cf commit edcbb4e

11 files changed

Lines changed: 5272 additions & 4 deletions

.github/workflows/test-copilot-close-discussion.lock.yml

Lines changed: 1223 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
on:
3+
discussion:
4+
types: [created]
5+
reaction: eyes
6+
7+
permissions: read-all
8+
9+
engine:
10+
id: copilot
11+
12+
safe-outputs:
13+
close-discussion:
14+
target: "triggering"
15+
# min: 1
16+
---
17+
18+
If the title of the discussion #${{ github.event.discussion.number }} is exactly "Test close discussion from Copilot" then close the discussion with a comment "Closed by Copilot safe output" and resolution reason "RESOLVED".

.github/workflows/test-copilot-close-issue.lock.yml

Lines changed: 1215 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
on:
3+
issues:
4+
types: [opened, reopened]
5+
reaction: eyes
6+
7+
permissions: read-all
8+
9+
engine:
10+
id: copilot
11+
12+
safe-outputs:
13+
close-issue:
14+
target: "triggering"
15+
# min: 1
16+
---
17+
18+
If the title of the issue #${{ github.event.issue.number }} is exactly "Test close issue from Copilot" then close the issue with a comment "Closed by Copilot safe output".

.github/workflows/test-copilot-close-pull-request.lock.yml

Lines changed: 1218 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
on:
3+
pull_request:
4+
types: [opened, reopened]
5+
reaction: eyes
6+
7+
permissions: read-all
8+
9+
engine:
10+
id: copilot
11+
12+
safe-outputs:
13+
close-pull-request:
14+
target: "triggering"
15+
# min: 1
16+
---
17+
18+
If the title of the pull request #${{ github.event.pull_request.number }} starts with "Test PR for Copilot Close" then close the pull request with a comment "Closed by Copilot safe output".

.github/workflows/test-copilot-remove-labels.lock.yml

Lines changed: 1218 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
on:
3+
issues:
4+
types: [opened, reopened]
5+
reaction: eyes
6+
7+
permissions: read-all
8+
9+
engine:
10+
id: copilot
11+
12+
safe-outputs:
13+
remove-labels:
14+
allowed: [copilot-remove-label-test]
15+
# min: 1
16+
---
17+
18+
If the title of the issue #${{ github.event.issue.number }} is "Test remove label from Copilot" then remove the label "copilot-remove-label-test" from the issue.

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,66 @@ Nightly GitHub Actions run at 3:00 AM UTC. Manually trigger via Actions → "Nig
4646

4747
**Authentication issues**: Run `gh auth login` and `gh auth status`
4848
**Missing gh-aw**: Script auto-builds it, or manually: `git clone https://github.com/github/gh-aw.git && cd gh-aw && make build`
49-
**Timeouts**: Check log file `e2e-test-*.log` for details
49+
**Timeouts**: Check log file `e2e-test-*.log` for details
50+
51+
## Safe Output Test Coverage
52+
53+
Tracking the full matrix of [safe outputs](https://github.com/github/gh-aw/blob/main/docs/src/content/docs/reference/safe-outputs.md) and [PR safe outputs](https://github.com/github/gh-aw/blob/main/docs/src/content/docs/reference/safe-outputs-pull-requests.md). New tests are copilot-only (claude/codex coverage already exists for the original set).
54+
55+
### Already Tested
56+
57+
- [x] `create-issue` — test-copilot-create-issue
58+
- [x] `create-discussion` — test-copilot-create-discussion
59+
- [x] `create-pull-request` — test-copilot-create-pull-request
60+
- [x] `create-pull-request` (max:2) — test-copilot-create-two-pull-requests
61+
- [x] `create-code-scanning-alert` — test-copilot-create-repository-code-scanning-alert
62+
- [x] `mcp` — test-copilot-mcp
63+
- [x] `custom safe output jobs` — test-copilot-custom-safe-outputs
64+
- [x] `gh-steps` — test-copilot-gh-steps
65+
- [x] `add-comment` — test-copilot-add-comment
66+
- [x] `add-comment` (discussions) — test-copilot-add-discussion-comment
67+
- [x] `add-labels` — test-copilot-add-labels
68+
- [x] `update-issue` — test-copilot-update-issue
69+
- [x] `update-pull-request` — test-copilot-update-pull-request
70+
- [x] `push-to-pull-request-branch` — test-copilot-push-to-pull-request-branch
71+
- [x] `create-pull-request-review-comment` — test-copilot-create-pull-request-review-comment
72+
- [x] `slash_command` + `add-comment` — test-copilot-command
73+
74+
### Issues & Discussions — Remaining
75+
76+
- [x] `close-issue` — test-copilot-close-issue
77+
- [ ] `link-sub-issue` — test-copilot-link-sub-issue
78+
- [ ] `update-discussion` — test-copilot-update-discussion
79+
- [x] `close-discussion` — test-copilot-close-discussion
80+
81+
### Pull Requests — Remaining
82+
83+
- [x] `close-pull-request` — test-copilot-close-pull-request
84+
- [ ] `reply-to-pull-request-review-comment` — test-copilot-reply-to-pull-request-review-comment
85+
- [ ] `resolve-pull-request-review-thread` — test-copilot-resolve-pull-request-review-thread
86+
- [ ] `submit-pull-request-review` — test-copilot-submit-pull-request-review
87+
- [ ] `add-reviewer` — test-copilot-add-reviewer
88+
89+
### Labels, Assignments & Reviews — Remaining
90+
91+
- [x] `remove-labels` — test-copilot-remove-labels
92+
- [ ] `hide-comment` — test-copilot-hide-comment
93+
- [ ] `assign-milestone` — test-copilot-assign-milestone
94+
- [ ] `assign-to-user` — test-copilot-assign-to-user
95+
- [ ] `unassign-from-user` — test-copilot-unassign-from-user
96+
97+
### Security & Agent Tasks — Remaining
98+
99+
- [ ] `dispatch-workflow` — test-copilot-dispatch-workflow
100+
- [ ] `call-workflow` — test-copilot-call-workflow
101+
102+
### Deferred (require special infrastructure)
103+
104+
- [ ] `assign-to-agent` — requires Copilot coding agent access
105+
- [ ] `create-agent-session` — requires Copilot coding agent access
106+
- [ ] `create-project` / `update-project` / `create-project-status-update` — requires PAT with Projects permissions
107+
- [ ] `update-release` — requires existing releases
108+
- [ ] `upload-asset` — requires orphaned branch setup
109+
- [ ] `autofix-code-scanning-alert` — requires existing code scanning alerts
110+
- [ ] `dispatch_repository` — experimental, requires cross-repo setup
111+
- [ ] `missing-data` — system type, auto-enabled

0 commit comments

Comments
 (0)