Skip to content

Commit b77a73f

Browse files
Add working agentic issue triage workflows (#5527)
The workflows added in #5409 were broken and never customized. They couldn't see spam from non-collaborators (wrong `roles`/`min-integrity`), couldn't close issues (missing `close-issue` safe-output), and failed auth (under-scoped `COPILOT_GITHUB_TOKEN`). Fixed and expanded into three workflows: - `issue-triage.md`: Incoming issue triage on open/reopen. Closes spam and duplicates as "not planned", requests author feedback when reproduction is missing, or labels real issues with `Needs: Triage` plus area/platform/type labels and a maintainer hand-off note (includes reproducibility assessment and Copilot-fix suitability). - `issue-comment-handler.md`: Smart comment processor on `issue_comment`. When users confirm a fix is resolved, thanks them and closes the issue (less manual work for maintainers). When users respond to `Needs: Author Feedback` with substance, moves back to `Needs: Triage`. Politely educates on non-actionable bumps. Auto-labels based on keywords (Area-*, OS-*, Bug-*). Summarizes threads over 10 comments. Flags duplicate mentions. - `stale-closer.md`: Weekly intelligent backlog cleanup. Closes up to 10 issues/week using AI judgment (no reproduction after 90+ days, duplicates of closed issues, external blockers declined upstream, features out of scope). Skips anything with maintainer activity in last 6 months. Conservative: when in doubt, keeps open. Deleted `close-stale-issues.yml` (Issue Housekeeping) — it used `actions/stale` with time-based rules that didn't work well. Replaced by `stale-closer.md` using judgment. Switched all three to `permissions: copilot-requests: write` instead of PAT for centralized org billing and no secret management. Upgraded gh-aw from v0.49.5 to v0.79.8. Deleted auto-generated `agentics-maintenance.yml` (none of our workflows use `expires` so we don't need it). Expected workflow: new issues get triaged/closed within minutes, users confirming fixes auto-close their issues, and maintainers filter to `Needs: Triage` to see only real, actionable, pre-labeled issues. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 27e31cd commit b77a73f

8 files changed

Lines changed: 4648 additions & 726 deletions

‎.github/aw/actions-lock.json‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v9.0.0": {
4+
"repo": "actions/github-script",
5+
"version": "v9.0.0",
6+
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
7+
},
8+
"github/gh-aw-actions/setup-cli@v0.79.8": {
9+
"repo": "github/gh-aw-actions/setup-cli",
10+
"version": "v0.79.8",
11+
"sha": "c0338fef4749d08c21f8f975fb0e37efa17dda47"
12+
},
13+
"github/gh-aw-actions/setup@v0.79.8": {
14+
"repo": "github/gh-aw-actions/setup",
15+
"version": "v0.79.8",
16+
"sha": "c0338fef4749d08c21f8f975fb0e37efa17dda47"
17+
}
18+
}
19+
}

‎.github/workflows/close-stale-issues.yml‎

Lines changed: 0 additions & 45 deletions
This file was deleted.

‎.github/workflows/issue-comment-handler.lock.yml‎

Lines changed: 1565 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
description: |
3+
Issue comment handler for the PowerShell/vscode-powershell repository. When someone
4+
comments on an issue labeled "Needs: Author Feedback", judges whether they actually
5+
provided the requested information. If the issue author has responded with substance
6+
(not just "any update?"), moves the issue back to the Needs: Triage queue so
7+
maintainers can act on it. Otherwise leaves it in the feedback-waiting state.
8+
9+
on:
10+
issue_comment:
11+
types: [created]
12+
reaction: eyes
13+
roles: all
14+
15+
permissions:
16+
copilot-requests: write
17+
issues: read
18+
19+
network: defaults
20+
21+
safe-outputs:
22+
add-labels:
23+
allowed:
24+
- "Needs: Triage"
25+
- "Area-Debugging"
26+
- "Area-IntelliSense"
27+
- "Area-PSReadLine"
28+
- "Area-Pester"
29+
- "Area-Script Analysis"
30+
- "Area-Startup"
31+
- "Area-Configuration"
32+
- "Area-Code Formatting"
33+
- "OS-Windows"
34+
- "OS-macOS"
35+
- "OS-Linux"
36+
- "Bug: PowerShell Core"
37+
- "Bug: PowerShell 5.1"
38+
- "Bug: VS Code"
39+
- "Resolution-Duplicate"
40+
max: 5
41+
remove-labels:
42+
allowed:
43+
- "Needs: Author Feedback"
44+
max: 1
45+
add-comment:
46+
max: 2
47+
close-issue:
48+
state-reason: completed
49+
max: 1
50+
51+
tools:
52+
github:
53+
toolsets: [issues, labels]
54+
min-integrity: none
55+
56+
timeout-minutes: 5
57+
source: githubnext/agentics/workflows/issue-comment-handler.md@2f03fdaafb8c1ae62dfde7e0be762a822a201aeb
58+
engine: copilot
59+
---
60+
61+
# Issue Comment Handler — Intelligent Response Processing
62+
63+
You watch for activity on open issues in **PowerShell/vscode-powershell** and take
64+
smart actions to reduce maintainer workload while improving community engagement.
65+
66+
When a new comment is posted on an issue, read the issue and comment thread to
67+
understand context, then take action based on what the comment contains.
68+
69+
## 1. Gather context
70+
71+
- Read the issue with `get_issue` to see the original report, current labels, author,
72+
and state.
73+
- Read the comment thread with `get_issue_comments` to understand:
74+
- What information was originally requested (if any).
75+
- What the new comment says and who posted it.
76+
- The full conversation history (for thread summaries and duplicate detection).
77+
78+
## 2. Decision tree
79+
80+
### A. Fix verification by user
81+
82+
If the comment says the issue is **fixed, resolved, or working** (phrases like "this is
83+
fixed", "workaround works", "resolved in vX.Y.Z", "no longer reproduces", "upgrade
84+
fixed it"):
85+
86+
- Thank the user warmly (one sentence).
87+
- Close the issue with `state-reason: completed`.
88+
- Remove `Needs: Author Feedback` if present.
89+
90+
**Example comment**: "Thank you for confirming this is resolved! Closing as fixed. If
91+
you see it again, please reopen or file a new issue."
92+
93+
### B. Meaningful response to feedback request
94+
95+
If the issue has `Needs: Author Feedback` AND the issue author posted substantive new
96+
information (reproduction steps, versions, clarifications, code samples, logs, error
97+
messages):
98+
99+
- Remove `Needs: Author Feedback`.
100+
- Add `Needs: Triage` (back to maintainer queue).
101+
- Add relevant area/component labels based on content (see auto-labeling below).
102+
- Optionally add a brief acknowledgement (one line thanking them). Keep it short.
103+
104+
### C. Non-actionable bump
105+
106+
If the issue has `Needs: Author Feedback` AND the author posted a non-actionable bump
107+
("any update?", "still broken", "+1", "bump", "still an issue", no new details):
108+
109+
- Keep `Needs: Author Feedback` (still waiting).
110+
- Add a polite, brief educational comment (2-3 sentences) explaining what information
111+
would help. Customize based on what was originally requested. **Do not spam** — if
112+
you've already left a similar comment on this issue, skip adding another.
113+
114+
**Example**: "We see you're still affected. To help us investigate, please share your
115+
PowerShell version (`$PSVersionTable`), VS Code version, and the exact steps to
116+
reproduce the issue. This will help us track down the root cause."
117+
118+
### D. Long thread summary
119+
120+
If the issue is moving to `Needs: Triage` (outcome B above) AND the thread has **10+
121+
comments**:
122+
123+
- Add a summary comment at the end (before your acknowledgement if any):
124+
- Key points from discussion
125+
- Whether reproduction is confirmed (and how)
126+
- Workarounds tried
127+
- Affected versions/platforms
128+
- Any duplicate references or related issues
129+
130+
**Format**: "**Thread summary for maintainers**: [2-4 concise bullets]"
131+
132+
### E. Duplicate detection
133+
134+
If someone comments "same issue as #1234", "duplicate of #1234", or links to another
135+
issue claiming they're the same:
136+
137+
- Add `Resolution-Duplicate` label as a **candidate** (maintainer will verify).
138+
- Add a comment: "This may be a duplicate of #1234. A maintainer will verify and link
139+
them if confirmed."
140+
- If the issue already has `Needs: Author Feedback`, also add `Needs: Triage` so
141+
maintainers see it.
142+
143+
### F. Auto-labeling from content
144+
145+
When processing **any** comment (outcomes A, B, C, or E), scan the comment and issue
146+
body for keywords and add relevant labels (max 5 total across all categories):
147+
148+
**Area labels** (scan for these keywords):
149+
- `Area-Debugging`: "debugger", "breakpoint", "watch", "debug console", "launch.json",
150+
"attach"
151+
- `Area-IntelliSense`: "intellisense", "autocomplete", "completions", "suggestions",
152+
"parameter hints", "signature help"
153+
- `Area-PSReadLine`: "psreadline", "readline", "tab completion", "history", "prediction"
154+
- `Area-Pester`: "pester", "test explorer", ".tests.ps1", "describe", "it should"
155+
- `Area-Script Analysis`: "pssa", "psscriptanalyzer", "linting", "code analysis",
156+
"formatting"
157+
- `Area-Startup`: "slow start", "loading", "activation", "startup time", "takes
158+
forever to load"
159+
- `Area-Configuration`: "settings.json", "configuration", "workspace settings"
160+
- `Area-Code Formatting`: "formatting", "indentation", "format document"
161+
162+
**OS labels** (scan for these keywords in paths/error messages):
163+
- `OS-Windows`: "C:\\", "Program Files", "WindowsPowerShell", ".exe"
164+
- `OS-macOS`: "/Users/", "/Applications/", "darwin", "mac", "osx"
165+
- `OS-Linux`: "/home/", "/usr/bin/", "ubuntu", "debian", "fedora", "linux"
166+
167+
**Host/version labels** (scan for these keywords):
168+
- `Bug: PowerShell Core`: "pwsh", "powershell 7", "$PSVersionTable.PSVersion.Major -ge 7"
169+
- `Bug: PowerShell 5.1`: "powershell 5", "windows powershell", "PSVersion 5.1"
170+
- `Bug: VS Code`: "vscode", "code.exe", "visual studio code"
171+
172+
**Guidelines**:
173+
- Only add labels when confidence is high (clear keyword match).
174+
- Don't re-add labels already present.
175+
- Prioritize area labels (most useful for routing).
176+
177+
### G. No action needed
178+
179+
If the comment is:
180+
- From a maintainer (not a user needing help), or
181+
- On an issue without `Needs: Author Feedback` and doesn't match A, E, or auto-labeling
182+
criteria, or
183+
- Unrelated discussion/questions from third parties:
184+
185+
→ **Take no action.** Exit cleanly with no safe-output calls.
186+
187+
## Guardrails
188+
189+
- **Max 2 comments per run** (never spam threads). If you need to leave both an
190+
acknowledgement and a summary, combine them into one comment.
191+
- **Be polite and encouraging**. Users are taking time to help us debug.
192+
- **Be conservative**. When in doubt about closing or labeling, leave it for a human.
193+
- **Reopen-friendly**. Every closure should acknowledge the user can reopen if needed.

0 commit comments

Comments
 (0)