manage_pull_requests
Manage Azure DevOps pull requests. Supports 12 actions covering listing, creating, updating, commenting, voting, and managing reviewers and threads.
Actions
Section titled “Actions”| Action | Description | Required Params | Optional Params | Write |
|---|---|---|---|---|
list | List pull requests for a repository | repo_id | project_key, status, top | No |
get | Get pull request details | repo_id, pr_id | project_key | No |
create | Create a new pull request | repo_id, title, source_branch, target_branch | project_key, description, is_draft | Yes |
update | Update a pull request | repo_id, pr_id | project_key, title, description, status | Yes |
add_comment | Add a general comment | repo_id, pr_id, comment | project_key | Yes |
list_comments | List all comment threads | repo_id, pr_id | project_key | No |
vote | Submit a vote on a PR | repo_id, pr_id, reviewer_id | project_key, vote | Yes |
list_reviewers | List reviewers on a PR | repo_id, pr_id | project_key | No |
update_reviewers | Add or remove reviewers | repo_id, pr_id, reviewer_ids | project_key, status | Yes |
create_thread | Create a comment thread (optional inline) | repo_id, pr_id, comment | project_key, file_path, line | Yes |
update_thread | Update a thread status | repo_id, pr_id, thread_id, status | project_key | Yes |
reply_to_comment | Reply to a comment thread | repo_id, pr_id, thread_id, comment | project_key | Yes |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
action | string | Required. The action to perform |
project_key | string | Project name |
repo_id | string | Repository name or ID (required for most actions) |
pr_id | integer | Pull request ID (required for get, update, comments, vote, reviewers) |
status | string | Filter by status: active, completed, abandoned, all (for list). Also used for update and update_reviewers (add/remove) |
top | integer | Max results to return |
title | string | PR title (required for create) |
description | string | PR description (for create, update) |
source_branch | string | Source branch name (required for create) |
target_branch | string | Target branch name (required for create) |
is_draft | boolean | Create as draft PR (for create) |
comment | string | Comment content (for add_comment, create_thread, reply_to_comment) |
reviewer_id | string | Reviewer ID (for vote) |
vote | integer | Vote value: 10=approved, 5=approved with suggestions, 0=no vote, -5=waiting, -10=rejected |
reviewer_ids | string | Comma-separated reviewer IDs (for update_reviewers) |
thread_id | integer | Thread ID (for update_thread, reply_to_comment) |
file_path | string | File path for inline comment (for create_thread) |
line | integer | Line number for inline comment (for create_thread) |
Examples
Section titled “Examples”List active PRs
Section titled “List active PRs”{ "action": "list", "project_key": "MyProject", "repo_id": "backend-api", "status": "active"}Create a pull request
Section titled “Create a pull request”{ "action": "create", "project_key": "MyProject", "repo_id": "backend-api", "title": "Add user authentication", "description": "Implements OAuth2 login flow", "source_branch": "feature/auth", "target_branch": "main", "is_draft": false}Vote to approve a PR
Section titled “Vote to approve a PR”{ "action": "vote", "project_key": "MyProject", "repo_id": "backend-api", "pr_id": 101, "reviewer_id": "user-guid-here", "vote": 10}Create an inline comment on a file
Section titled “Create an inline comment on a file”{ "action": "create_thread", "project_key": "MyProject", "repo_id": "backend-api", "pr_id": 101, "comment": "Consider using a constant here instead of a magic number.", "file_path": "/src/handlers/auth.go", "line": 42}Reply to a comment thread
Section titled “Reply to a comment thread”{ "action": "reply_to_comment", "project_key": "MyProject", "repo_id": "backend-api", "pr_id": 101, "thread_id": 5, "comment": "Good point, I'll update this."}