Azure / Azure/azure-devops-cli-extension

Cross-repo policies

Open
#971 2 comments 1 reaction 0 assignees View on GitHub
Feature
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.
![image](https://user-images.githubusercontent.com/266258/77346356-5ceb5200-6cf3-11ea-853a-fae64a8d9c76.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.