Skip to content

Expose Copilot review thread resolution reasons - #3123

Open
cagesellchen wants to merge 2 commits into
mainfrom
cagesellchen-expose-resolve-as-input
Open

Expose Copilot review thread resolution reasons#3123
cagesellchen wants to merge 2 commits into
mainfrom
cagesellchen-expose-resolve-as-input

Conversation

@cagesellchen

Copy link
Copy Markdown

Summary

Expose an optional resolutionReason argument on both review-thread resolution tools and forward it to GraphQL as resolutionReason.

Why

This lets MCP clients record how Copilot Code Review threads were resolved.

Depends on github/github#448461 (commit 191d1c3d49211cd54810c2b1707e28c5ae5460d7).

Fixes # N/A

What changed

  • Added optional resolutionReason inputs to resolve_review_thread and pull_request_review_write.
  • Forwarded the value through the shared resolver while preserving omission behavior.
  • Updated behavioral tests, tool snapshots, and generated docs.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed — both review-thread resolution surfaces now accept the optional reason.
  • New tool added

Prompts tested (tool changes only)

  • "Resolve this Copilot review thread as addressed."
  • "Resolve this Copilot review thread as wont-fix."

Security / limits

  • No security or limits impact — authorization and server-side eligibility checks are unchanged.
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8bf69b12-5131-4382-8c81-8ed1c88fb211
@cagesellchen
cagesellchen requested a review from a team as a code owner August 19, 2026 18:42
Copilot AI balanced review requested due to automatic review settings August 19, 2026 18:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Exposes optional Copilot review-thread resolution reasons through both resolution tools and forwards them to GraphQL.

Changes:

  • Added resolutionReason to both tool schemas.
  • Forwarded optional reasons through the shared resolver.
  • Updated tests, snapshots, and generated documentation.
Show a summary per file
File Description
README.md Documents the aggregate tool parameter.
pkg/github/pullrequests.go Adds reason forwarding to the shared resolver.
pkg/github/pullrequests_test.go Tests aggregate reason forwarding.
pkg/github/pullrequests_granular.go Adds the granular tool parameter.
pkg/github/granular_tools_test.go Tests granular reason forwarding.
pkg/github/__toolsnaps__/resolve_review_thread.snap Updates the granular tool schema snapshot.
pkg/github/__toolsnaps__/pull_request_review_write.snap Updates the aggregate tool schema snapshot.
docs/feature-flags.md Documents the granular parameter.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Suppressed comments (1)

pkg/github/pullrequests.go:2108

  • Changing this exported function's signature is source-breaking for repositories that import pkg/github. Preserve the existing four-argument ResolveReviewThread API as a compatibility wrapper, and add a separate reason-aware entry point for these tool handlers.
func ResolveReviewThread(ctx context.Context, client *githubv4.Client, threadID string, resolutionReason *string, resolve bool) (*mcp.CallToolResult, error) {
  • Files reviewed: 8/8 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread pkg/github/pullrequests.go
Comment thread pkg/github/pullrequests_granular.go
Comment thread pkg/github/granular_tools_test.go Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8bf69b12-5131-4382-8c81-8ed1c88fb211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants