| name | update-issues |
| description | Update GitHub issues from triage, investigation, or prioritization reports โ adds labels, posts comments, sets milestones, and closes issues with safety checks |
/update-issues - Update GitHub Issues from Reports
Read a triage, investigation, or prioritization report and apply the recommended actions to GitHub. This is the only skill in the issue workflow that modifies GitHub state.
Usage
/update-issues --from-report [path] [--dry-run]
--from-report โ Path to a report JSON file (auto-detects type: triage decisions, investigation decisions, or resolutions). If path omitted, uses the most recent report JSON in .work/triage/reports/.
--dry-run โ Show what would be done without making changes. This is the DEFAULT behavior on first invocation โ you must confirm before actions are applied.
Instructions
Stage 0 โ Load Report
Read the JSON file and determine report type:
- Has
verdicts array โ Triage decisions (YYYY-MM-DD-DECISIONS[-batch-N].json)
- Has
investigations array โ Investigation decisions (YYYY-MM-DD-INVESTIGATION-DECISIONS.json)
- Has
resolutions array โ Resolution decisions (YYYY-MM-DD-RESOLUTIONS.json)
Detect by JSON content, not filename โ note *-DECISIONS.json also matches investigation files, so "most recent" filename lookups must check the arrays to pick the intended type.
Stage 1 โ Translate Recommendations to Actions
For each issue in the report, determine the GitHub actions to take:
From triage decisions:
| Verdict | Actions |
|---|
| Close - Fixed | Close issue (reason: completed), add label triaged, remove label triage |
| Close - Duplicate | Close issue (reason: not planned), comment linking canonical issue, add label duplicate |
| Close - Not a Bug | Close issue (reason: not planned), add label not-bug, comment explaining why this is not a defect |
| Close - Already Exists | Close issue (reason: not planned), add label already-exists, comment explaining the existing feature |
| Close - Invalid | Close issue (reason: not planned), comment with explanation |
| Close - Stale | Close issue (reason: not planned), comment explaining staleness |
| Request More Info | Add label needs-more-info, comment requesting specific info |
| Retype - Bug | Change issue type to bug |
| Retype - Feature Request | Change issue type to enhancement |
| Valid - Needs Triage | No action (needs investigation first) |
| Valid - Already Triaged | No action |
From investigation decisions:
| Result | Actions |
|---|
| Confirmed Bug | Add label triaged, remove label triage |
| Confirmed Bug (blocked) | Add label triaged, remove label triage, add blocked label (blocked, blocked: vscode, blocked: git, blocked: cli, or blocked: language-server based on blockedBy field) |
| Likely Fixed | Add label needs-more-info, comment asking reporter to verify on latest version |
| Cannot Reproduce | Add label needs-more-info, comment requesting updated repro steps |
| Inconclusive / Insufficient | No action (needs human review) |
From resolution decisions:
| Recommendation | Actions |
|---|
| shortlist | Set milestone to "Shortlist", add label triaged, remove label triage |
| backlog | Set milestone to "Backlog", add label triaged, remove label triage |
| wont-fix | Close issue (reason: not planned), add label wontfix, comment with rationale |
| community-contribution | Add label needs-help (if bug) or needs-champion (if enhancement), comment inviting contribution |
Stage 2 โ Pre-flight State Check
Critical: Before applying ANY action, verify current issue state:
gh issue view <number> --repo gitkraken/vscode-gitlens --json state,labels,milestone
For each issue, check:
- Already closed? โ Skip close actions, warn user
- Labels already applied? โ Skip redundant label additions
- Milestone already set? โ Skip if same milestone, warn if different
- Report age โ If the report is older than 24 hours, warn that issue state may have changed
Stage 3 โ Present Dry Run
Before executing any actions, present a summary table:
## Actions to Apply
| Issue | Action | Details | Status |
| ----- | ------------- | ----------------------------------- | ---------------------------- |
| #1234 | Close | Reason: not planned, Comment: "..." | Ready |
| #1234 | Add label | `duplicate` | Ready |
| #2345 | Add label | `needs-more-info` | Ready |
| #2345 | Comment | "Could you provide..." | Ready |
| #3456 | Set milestone | Backlog | Ready |
| #4567 | Close | Reason: completed | โ ๏ธ Already closed โ skipping |
### Summary
- Actions ready: N
- Skipped (already applied): N
- Warnings: N
Ask for confirmation before proceeding. The user may choose to:
- Apply all ready actions
- Apply selectively (specify issue numbers)
- Cancel
Stage 4 โ Execute Actions
Execute approved actions using gh CLI:
gh issue edit <number> --repo gitkraken/vscode-gitlens --add-label "<label>"
gh issue edit <number> --repo gitkraken/vscode-gitlens --remove-label "<label>"
gh issue edit <number> --repo gitkraken/vscode-gitlens --milestone "<milestone>"
gh issue comment <number> --repo gitkraken/vscode-gitlens --body "<message>"
gh issue close <number> --repo gitkraken/vscode-gitlens --reason "not planned" --comment "<message>"
gh issue close <number> --repo gitkraken/vscode-gitlens --reason "completed" --comment "<message>"
Execution order per issue: Labels first, then milestone, then comment, then close (if applicable). This ensures the issue has correct metadata before closing.
Error handling: If a gh command fails, log the error and continue with remaining actions. Report all failures at the end.
Stage 5 โ Audit Log
Write an audit log to .work/triage/reports/YYYY-MM-DD-ACTIONS.md:
# Actions Applied โ YYYY-MM-DD
Source report: <path to source JSON>
Report type: triage | investigation | resolution
Applied at: <ISO timestamp>
Applied by: <git user>
## Actions Taken
| Issue | Action | Result |
| ----- | ----------------------------- | --------------------------------------- |
| #1234 | Closed (not planned) | โ Success |
| #1234 | Added label `duplicate` | โ Success |
| #2345 | Added label `needs-more-info` | โ Success |
| #2345 | Posted comment | โ Success |
| #3456 | Set milestone: Backlog | โ Failed: milestone "Backlog" not found |
## Summary
- Successful: N
- Failed: N
- Skipped: N
Safety Rules
- Dry-run first โ ALWAYS show the action plan and get confirmation before executing
- Pre-flight checks โ ALWAYS verify current issue state before acting
- Close confirmation โ Closing issues requires explicit user approval for EACH issue
- No label creation โ Only use existing labels. If a recommended label doesn't exist, warn and skip
- No force operations โ Never use
--force or bypass safety checks
- Audit everything โ Every action taken must be logged
Chaining
This skill consumes output from the other issue workflow skills:
/triage recent โ /update-issues (apply triage verdicts)
/triage recent โ /investigate --from-report โ /update-issues (apply investigation results)
/triage recent โ /investigate --from-report โ /prioritize --from-report โ /update-issues (full pipeline)