Skip to content

Add tool to update pull request thread status (WontFix, ByDesign, Closed, etc.)Β #748

@velox-copilot

Description

@velox-copilot

Suggested Labels: Enhancement 🌟 new feature or request, Repos πŸ“ issue in the repos area

Is your feature request related to a problem?

Yes. Currently, AI agents using the Azure DevOps MCP can only resolve PR comment threads using resolve_comment, which sets the status to "Fixed". There's no way to mark threads as "Won't Fix", "By Design", "Closed", or "Pending" without manual intervention in the Azure DevOps web UI.

This limits AI-assisted code review workflows where developers want to dismiss feedback with appropriate status indicators.

Describe the solution you'd like

Add a new tool update_pull_request_thread (or extend existing functionality) that allows updating an existing PR thread's status to any valid value:

  • Active
  • Fixed
  • WontFix
  • Closed
  • ByDesign
  • Pending

Proposed Tool Definition:

update_pull_request_thread({
  repositoryId: string,      // Required: Repository ID
  pullRequestId: number,     // Required: Pull request ID
  threadId: number,          // Required: Thread ID to update
  status?: string,           // Optional: New status (Active, Fixed, WontFix, Closed, ByDesign, Pending)
})

Azure DevOps REST API Reference:

PATCH https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}?api-version=7.1

Request Body:
{
  "status": 3  // 1=Active, 2=Fixed, 3=WontFix, 4=Closed, 5=ByDesign, 6=Pending
}

Documentation: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-request-threads/update

Describe alternatives you've considered

  1. Using resolve_comment - Only sets status to "Fixed", not other statuses
  2. Using create_pull_request_thread with status - Creates a new thread, doesn't update existing ones
  3. Manual intervention in Azure DevOps web UI - Breaks AI automation workflows

Additional context

This feature would enable complete AI-assisted code review workflows where agents can:

  1. List PR threads
  2. Reply to comments with explanations
  3. Set appropriate resolution status (including "Won't Fix" for intentional design decisions)

Use Case Example:
An AI agent reviewing a PR comment that suggests a change the developer intentionally doesn't want to make could respond with an explanation and mark the thread as "Won't Fix" rather than "Fixed".

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions