From bf34fa4464768e07ab51885aeb4c38af7b32bea0 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sun, 8 Feb 2026 07:38:19 +0000 Subject: [PATCH] feat: add review thread resolution to pr-fixer mode via GitHub GraphQL API Updated the pr-fixer mode rules to resolve review threads on GitHub after addressing review feedback, instead of only checking off internal checkboxes. This uses the GitHub GraphQL API resolveReviewThread mutation to mark threads as resolved, providing clear signal to reviewers that their feedback was acted on. Changes across all 5 rule files: - 1_workflow.xml: Added resolve-threads phase and completion criterion - 2_best_practices.xml: Added principle and quality checklist item - 3_common_patterns.xml: Added 3 new patterns for fetching/resolving threads - 4_tool_usage.xml: Added gh api graphql tool guidance and CLI reference - 5_examples.xml: Added thread resolution steps to example workflow --- .roo/rules-pr-fixer/1_workflow.xml | 11 +++ .roo/rules-pr-fixer/2_best_practices.xml | 11 +++ .roo/rules-pr-fixer/3_common_patterns.xml | 86 +++++++++++++++++++++++ .roo/rules-pr-fixer/4_tool_usage.xml | 49 +++++++++++++ .roo/rules-pr-fixer/5_examples.xml | 49 +++++++++++++ 5 files changed, 206 insertions(+) diff --git a/.roo/rules-pr-fixer/1_workflow.xml b/.roo/rules-pr-fixer/1_workflow.xml index fb487e5fddf..08b2f7521e9 100644 --- a/.roo/rules-pr-fixer/1_workflow.xml +++ b/.roo/rules-pr-fixer/1_workflow.xml @@ -55,6 +55,16 @@ + + After pushing fixes, resolve the review threads on GitHub that have been addressed. This provides clear signal to reviewers that their feedback was acted on. + + Fetch all review threads for the PR using the GraphQL API: 'gh api graphql' with the pullRequest.reviewThreads query. + For each unresolved thread, determine if the corresponding feedback has been addressed by the code changes just pushed. + Resolve each addressed thread using the GraphQL 'resolveReviewThread' mutation with the thread's node ID. + Leave threads unresolved if they represent open questions, future work, or feedback that was intentionally not addressed. + + + Verify that the pushed changes resolve the issues. @@ -68,6 +78,7 @@ All actionable review comments have been addressed. + Addressed review threads have been resolved on GitHub using the GraphQL API. All tests are passing. The PR is free of merge conflicts. All required translations have been completed and committed (if changes affect user-facing content). diff --git a/.roo/rules-pr-fixer/2_best_practices.xml b/.roo/rules-pr-fixer/2_best_practices.xml index 2dc5775cedf..1fdafab3fa4 100644 --- a/.roo/rules-pr-fixer/2_best_practices.xml +++ b/.roo/rules-pr-fixer/2_best_practices.xml @@ -37,6 +37,16 @@ Verify .gitignore is properly configured + + Resolve Review Threads, Don't Just Check Boxes + After addressing review feedback and pushing changes, resolve the corresponding review threads on GitHub using the GraphQL API. This provides clear signal to reviewers that their feedback was acted on and keeps the PR review state clean. + Checking off internal checklists is not visible to reviewers. Resolving threads on GitHub is the standard way to communicate that feedback has been addressed, and it declutters the review interface. + + Review comment asking to rename a variable was addressed + Fetch review threads via GraphQL, find the matching thread, resolve it with the resolveReviewThread mutation + Only check off an internal checkbox or leave a reply comment without resolving the thread + + @@ -67,6 +77,7 @@ This ensures consistent and intelligent conflict resolution across all PRs. Have all review comments been addressed? + Have addressed review threads been resolved on GitHub via the GraphQL API? Are all CI/CD checks passing? Is the PR free of merge conflicts? Have the changes been tested locally? diff --git a/.roo/rules-pr-fixer/3_common_patterns.xml b/.roo/rules-pr-fixer/3_common_patterns.xml index 4ef2a34b9e6..9f9e1501f58 100644 --- a/.roo/rules-pr-fixer/3_common_patterns.xml +++ b/.roo/rules-pr-fixer/3_common_patterns.xml @@ -106,6 +106,92 @@ git commit -m "" + + Fetch all review threads for a PR using the GitHub GraphQL API. This returns each thread's node ID, resolution status, and the first comment's body/path/line for context. + + + + + Resolve a single review thread on GitHub using its node ID via the GraphQL API. Use this after addressing the feedback in the thread. + + + + + End-to-end pattern: fetch all unresolved review threads, then resolve each one that was addressed. + + + Safely stage files for commit while avoiding temporary files and respecting .gitignore.