az repos pr
Note
This reference is part of the azure-devops extension for the Azure CLI (version 2.30.0 or higher). The extension will automatically install the first time you run an az repos pr command. Learn more about extensions.
Manage pull requests.
Name | Description | Type | Status |
---|---|---|---|
az repos pr checkout |
Checkout the PR source branch locally, if no local changes are present. |
Extension | GA |
az repos pr create |
Create a pull request. |
Extension | GA |
az repos pr list |
List pull requests. |
Extension | GA |
az repos pr policy |
Manage pull request policy. |
Extension | GA |
az repos pr policy list |
List policies of a pull request. |
Extension | GA |
az repos pr policy queue |
Queue an evaluation of a policy for a pull request. |
Extension | GA |
az repos pr reviewer |
Manage pull request reviewers. |
Extension | GA |
az repos pr reviewer add |
Add one or more reviewers to a pull request. |
Extension | GA |
az repos pr reviewer list |
List reviewers of a pull request. |
Extension | GA |
az repos pr reviewer remove |
Remove one or more reviewers from a pull request. |
Extension | GA |
az repos pr set-vote |
Vote on a pull request. |
Extension | GA |
az repos pr show |
Get the details of a pull request. |
Extension | GA |
az repos pr update |
Update a pull request. |
Extension | GA |
az repos pr work-item |
Manage work items associated with pull requests. |
Extension | GA |
az repos pr work-item add |
Link one or more work items to a pull request. |
Extension | GA |
az repos pr work-item list |
List linked work items for a pull request. |
Extension | GA |
az repos pr work-item remove |
Unlink one or more work items from a pull request. |
Extension | GA |
Checkout the PR source branch locally, if no local changes are present.
az repos pr checkout --id
[--remote-name]
ID of the pull request.
Name of git remote against which PR is raised.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Create a pull request.
az repos pr create [--auto-complete {false, true}]
[--bypass-policy {false, true}]
[--bypass-policy-reason]
[--delete-source-branch {false, true}]
[--description]
[--detect {false, true}]
[--draft {false, true}]
[--labels]
[--merge-commit-message]
[--open]
[--optional-reviewers]
[--org]
[--project]
[--repository]
[--required-reviewers]
[--source-branch]
[--squash {false, true}]
[--target-branch]
[--title]
[--transition-work-items {false, true}]
[--work-items]
Set the pull request to complete automatically when all policies have passed and the source branch can be merged into the target branch.
Bypass required policies (if any) and completes the pull request once it can be merged.
Reason for bypassing the required policies.
Delete the source branch after the pull request has been completed and merged into the target branch.
Description for the new pull request. Can include markdown. Each value sent to this arg will be a new line. For example: --description "First Line" "Second Line".
Automatically detect organization.
Use this flag to create the pull request in draft/work in progress mode.
The labels associated with the pull request. Space separated.
Message displayed when commits are merged.
Open the pull request in your web browser.
Additional users or groups to include as optional reviewers on the new pull request. Space separated.
Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.
Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.
Name or ID of the repository to create the pull request in.
Additional users or groups to include as required reviewers on the new pull request. Space separated.
Name of the source branch. Example: "dev".
Squash the commits in the source branch when merging into the target branch.
Name of the target branch. If not specified, defaults to the default branch of the target repository.
Title for the new pull request.
Transition any work items linked to the pull request into the next logical state. (e.g. Active -> Resolved).
IDs of the work items to link to the new pull request. Space separated.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
List pull requests.
az repos pr list [--creator]
[--detect {false, true}]
[--include-links]
[--org]
[--project]
[--repository]
[--reviewer]
[--skip]
[--source-branch]
[--status {abandoned, active, all, completed}]
[--target-branch]
[--top]
Limit results to pull requests created by this user.
Automatically detect organization.
Include _links for each pull request.
Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.
Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.
Name or ID of the repository.
Limit results to pull requests where this user is a reviewer.
Number of pull requests to skip.
Limit results to pull requests that originate from this source branch.
Limit results to pull requests with this status.
Limit results to pull requests that target this branch.
Maximum number of pull requests to list.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Vote on a pull request.
az repos pr set-vote --id
--vote {approve, approve-with-suggestions, reject, reset, wait-for-author}
[--detect {false, true}]
[--org]
ID of the pull request.
New vote value for the pull request.
Automatically detect organization.
Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Get the details of a pull request.
az repos pr show --id
[--detect {false, true}]
[--open]
[--org]
ID of the pull request.
Automatically detect organization.
Open the pull request in your web browser.
Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Update a pull request.
az repos pr update --id
[--auto-complete {false, true}]
[--bypass-policy {false, true}]
[--bypass-policy-reason]
[--delete-source-branch {false, true}]
[--description]
[--detect {false, true}]
[--draft {false, true}]
[--merge-commit-message]
[--org]
[--squash {false, true}]
[--status {abandoned, active, completed}]
[--title]
[--transition-work-items {false, true}]
ID of the pull request.
Set the pull request to complete automatically when all policies have passed and the source branch can be merged into the target branch.
Bypass required policies (if any) and completes the pull request once it can be merged.
Reason for bypassing the required policies.
Delete the source branch after the pull request has been completed and merged into the target branch.
New description for the pull request. Can include markdown. Each value sent to this arg will be a new line. For example: --description "First Line" "Second Line".
Automatically detect organization.
Publish the PR or convert to draft mode.
Message displayed when commits are merged.
Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.
Squash the commits in the source branch when merging into the target branch.
Set the new state of pull request.
New title for the pull request.
Transition any work items linked to the pull request into the next logical state. (e.g. Active -> Resolved).
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: