Complete pull request
complete_pull_requestMerge an active, non-draft pull request in Azure DevOps while enforcing branch policies. Provide the reviewed source commit SHA, choose a merge strategy, and confirm to complete the merge securely.
Instructions
Merge an active, non-draft PR without bypassing policies. Requires the reviewed source commit, write tools, and confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Must be true to perform the mutation. | |
| project | No | Project name or ID. Omit to use AZURE_DEVOPS_DEFAULT_PROJECT. | |
| repositoryId | Yes | Repository name or ID. | |
| mergeStrategy | Yes | ||
| pullRequestId | Yes | Pull request numeric ID. | |
| deleteSourceBranch | No | Delete the source branch after completion; defaults to false. | |
| mergeCommitMessage | No | ||
| transitionWorkItems | No | Move linked work items to their next logical state; defaults to false. | |
| expectedSourceCommitId | Yes | Exact source commit SHA reviewed and approved for merge. |