mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Adds a `reply-and-resolve-thread` subcommand to `scripts/pr-status.js` that combines replying and resolving a review thread in a single command. Also updates the generated `thread-N.md` files to show this command alongside the existing separate `reply-thread` and `resolve-thread` options, and documents the command in the agent skill files. ### Why? When addressing PR review comments, the typical workflow is to reply with a description of what was done and then immediately resolve the thread. This previously required two separate commands: ```bash node scripts/pr-status.js reply-thread <id> "Done -- ..." node scripts/pr-status.js resolve-thread <id> ``` Having a single command reduces friction for agents (and humans) closing out review threads after addressing feedback. ### How? - Added `reply-and-resolve-thread` subcommand in `main()` that calls the existing `replyToThread()` and `resolveThread()` functions in sequence. - Updated `generateThreadMd()` to include a "Reply and resolve in one step" code block in the Commands section of each unresolved thread file (alongside the existing separate commands, not replacing them). - Updated `.agents/skills/pr-status-triage/SKILL.md` to mention the combined command in workflow step 6 and added a "Thread interaction" quick-command reference section. - Updated `.agents/skills/pr-status-triage/workflow.md` to show the one-step alternative in the "Resolving Review Threads" section. <!-- NEXT_JS_LLM_PR --> --------- Co-authored-by: Tobias Koppers <[email protected]> Co-authored-by: Claude <[email protected]>
2.2 KiB
2.2 KiB
name, description
| name | description |
|---|---|
| pr-status-triage | Triage CI failures and PR review comments using scripts/pr-status.js. Use when investigating failing CI jobs, flaky tests, or PR review feedback. Covers blocker-first prioritization (build > lint > types > tests), CI env var matching for local reproduction, and the Known Flaky Tests distinction. |
PR Status Triage
Use this skill when the user asks about PR status, CI failures, or review comments in the Next.js monorepo.
Workflow
- Run
node scripts/pr-status.js --waitin the background (timeout 1 min), then readscripts/pr-status/index.md. - Analyze each
job-{id}.mdandthread-{N}.mdfile for failures and review feedback. - Prioritize blocking jobs first: build, lint, types, then test jobs.
- Treat failures as real until disproven; check the "Known Flaky Tests" section before calling anything flaky.
- Reproduce locally with the same mode and env vars as CI.
- After addressing review comments, reply to the thread describing what was done, then resolve it. Use
reply-and-resolve-threadto do both in one step, or usereply-thread+resolve-threadseparately. Seethread-N.mdfiles for ready-to-use commands. - When the only remaining failures are known flaky tests and no code changes are needed, retrigger the failing CI jobs with
gh run rerun <run-id> --failed. Then wait 5 minutes and go back to step 1. Repeat this loop up to 5 times.
Quick Commands
node scripts/pr-status.js # current branch PR
node scripts/pr-status.js <number> # specific PR
node scripts/pr-status.js [PR] --wait # background mode, waits for CI to finish
node scripts/pr-status.js --skip-flaky-check # skip flaky test detection
Thread interaction:
node scripts/pr-status.js reply-thread <threadNodeId> "<body>" # reply to a review thread
node scripts/pr-status.js resolve-thread <threadNodeId> # resolve a review thread
node scripts/pr-status.js reply-and-resolve-thread <threadNodeId> "<body>" # reply and resolve in one step
References
- workflow.md — prioritization, common failure patterns, resolving review threads
- local-repro.md — mode/env matching and isolation guidance