Azure / Azure/azure-devops-cli-extension
Cross-repo policies
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
I cannot use the az devops cli to configure cross-repo policies. When creating policy manually it appears that it creates a policy with the following settings.
```
"settings": {
"scope": [
{
"matchKind": "DefaultBranch",
"refName": null,
"repositoryId": null
}
]
}
```
The command `az repos policy work-item-linking create` does not allow setting branch or repositoryId values to null, and does not allow the option of DefaultBranch for matchKind.
```
$ az repos policy work-item-linking create --blocking true --enabled true --branch-match-type DefaultBranch
az repos policy work-item-linking create: 'DefaultBranch' is not a valid value for '--branch-match-type'. See 'az repos policy work-item-linking create --help'.
```
**Describe the solution you'd like**
`az repos policy work-item-linking create --blocking true --enabled true --branch-match-type DefaultBranch`
Also work for all the other policies that are possible to configure using cross-repo policies.
**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide
Assessment
This issue has not been assessed yet.