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]>
1.5 KiB
1.5 KiB
CI Triage Workflow
Prioritization Order
- Build failures
- Lint failures
- Type failures
- Test failures
- Review comments (after CI blockers)
Failure Handling Rules
- Investigate each failing job as if it is caused by the current changes.
- Do not assume flakiness by default.
- If the job output has a "Known Flaky Tests" section, use it as historical context, not as automatic dismissal.
Common Patterns
rust check / build:- Run
cargo fmt -- --check - Fix with
cargo fmt
- Run
lint / build:- Run
pnpm prettier --write <file> - Run the repo lint command if needed
- Run
- test failures:
- Run the exact failing test file locally
- Match dev vs start mode to the CI job
Resolving Review Threads
After addressing a review comment (e.g., making the requested code change), or when you detect the current code already addresses it:
- Reply to the thread describing what action was taken:
node scripts/pr-status.js reply-thread <threadNodeId> "Done -- <description of changes>" - Then resolve the thread:
node scripts/pr-status.js resolve-thread <threadNodeId>
Or do both in one step:
node scripts/pr-status.js reply-and-resolve-thread <threadNodeId> "Done -- <description of changes>"
The ready-to-use commands with the correct thread IDs are at the bottom of each thread-N.md file in scripts/pr-status/.
Important: Always reply with a description of the actions taken before resolving. This gives the reviewer context about what changed.