next.js
b7c11377 - pr-status: add reply-thread and resolve-thread subcommands (#90773)

Commit
61 days ago
pr-status: add reply-thread and resolve-thread subcommands (#90773) ### What? Adds two new subcommands to `scripts/pr-status.js`: - `reply-thread <threadNodeId> <body>` — posts a reply to a PR review thread - `resolve-thread <threadNodeId>` — marks a review thread as resolved Each generated `thread-N.md` file now includes a `## Commands` section at the bottom with ready-to-use commands pre-populated with the correct GraphQL node IDs. The resolve command is only shown for threads that are still open. Also updates the pr-status-triage skill to remind agents to reply to review threads with a description of actions taken before resolving them. ### Why? When an agent addresses review feedback, it should close the loop by replying to the thread (describing what was done) and resolving it. Previously there was no way to do this from the pr-status workflow — the agent would need to manually construct `gh api graphql` calls. ### How? - Fetches GraphQL node IDs for review threads (added `id` to the thread-level query) - Uses `execFileSync` with argument arrays (not shell strings) to safely pass the reply body to `gh api graphql` without shell escaping issues - GraphQL mutations used: `addPullRequestReviewThreadReply` and `resolveReviewThread` - Subcommand dispatch at the top of `main()` checks `process.argv[2]` against known subcommand names before falling through to the existing PR-number behavior
Author
Parents
Loading