az repos policy
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 policy command. Learn more about extensions.
Manage branch policy.
Commands
Name | Description | Type | Status |
---|---|---|---|
az repos policy approver-count |
Manage approver count policy. |
Extension | GA |
az repos policy approver-count create |
Create approver count policy. |
Extension | GA |
az repos policy approver-count update |
Update approver count policy. |
Extension | GA |
az repos policy build |
Manage build policy. |
Extension | GA |
az repos policy build create |
Create build policy. |
Extension | GA |
az repos policy build update |
Update build policy. |
Extension | GA |
az repos policy case-enforcement |
Manage case enforcement policy. |
Extension | GA |
az repos policy case-enforcement create |
Create case enforcement policy. |
Extension | GA |
az repos policy case-enforcement update |
Update case enforcement policy. |
Extension | GA |
az repos policy comment-required |
Manage comment required policy. |
Extension | GA |
az repos policy comment-required create |
Create comment resolution required policy. |
Extension | GA |
az repos policy comment-required update |
Update comment resolution required policy. |
Extension | GA |
az repos policy create |
Create a policy using a configuration file. |
Extension | GA |
az repos policy delete |
Delete a policy. |
Extension | GA |
az repos policy file-size |
Manage file size policy. |
Extension | GA |
az repos policy file-size create |
Create file size policy. |
Extension | GA |
az repos policy file-size update |
Update file size policy. |
Extension | GA |
az repos policy list |
List all policies in a project. |
Extension | GA |
az repos policy merge-strategy |
Manage merge strategy policy. |
Extension | GA |
az repos policy merge-strategy create |
Create merge strategy policy. |
Extension | GA |
az repos policy merge-strategy update |
Update merge strategy policy. |
Extension | GA |
az repos policy required-reviewer |
Manage required reviewer policy. |
Extension | GA |
az repos policy required-reviewer create |
Create required reviewer policy. |
Extension | GA |
az repos policy required-reviewer update |
Update required reviewer policy. |
Extension | GA |
az repos policy show |
Show policy details. |
Extension | GA |
az repos policy update |
Update a policy using a configuration file. |
Extension | GA |
az repos policy work-item-linking |
Manage work item linking policy. |
Extension | GA |
az repos policy work-item-linking create |
Create work item linking policy. |
Extension | GA |
az repos policy work-item-linking update |
Update work item linking policy. |
Extension | GA |
az repos policy create
Create a policy using a configuration file.
Recommended when creating policies using multiple scopes for a policy. See https://aka.ms/azure-devops-cli-docs-policy-file for more information.
az repos policy create --config
[--detect {false, true}]
[--org]
[--project]
Required Parameters
Local file path for configuration file. Please use \backslash when typing in directory path.
Optional Parameters
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/.
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.
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.
az repos policy delete
Delete a policy.
az repos policy delete --id
[--detect {false, true}]
[--org]
[--project]
[--yes]
Required Parameters
ID of the policy.
Optional Parameters
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/.
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.
Do not prompt for confirmation.
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.
az repos policy list
List all policies in a project.
az repos policy list [--branch]
[--detect {false, true}]
[--org]
[--project]
[--repository-id]
Optional Parameters
Branch name to filter results by exact match of branch name. The --repository-id parameter is required to use the branch filter. For example: --branch master.
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/.
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.
ID of the repository to filter results by exact match of the repository ID. For example --repository-ID e556f204-53c9-4153-9cd9-ef41a11e3345.
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.
az repos policy show
Show policy details.
az repos policy show --id
[--detect {false, true}]
[--org]
[--project]
Required Parameters
ID of the policy.
Optional Parameters
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/.
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.
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.
az repos policy update
Update a policy using a configuration file.
Recommended when creating policies using multiple scopes for a policy. See https://aka.ms/azure-devops-cli-docs-policy-file for more information.
az repos policy update --config
--id
[--detect {false, true}]
[--org]
[--project]
Required Parameters
Local file path for configuration file. Please use \backslash when typing in directory path.
ID of the policy.
Optional Parameters
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/.
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.
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.