az repos policy required-reviewer commands do not reflect full policy input
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Related command**
`az repos policy required-reviewer create`
`az repos policy required-reviewer update`
**Is your feature request related to a problem? Please describe.**
If I wanted to implement the following policy of adding required reviewers and not allowing those reviewers to approve themselves if they're a part of a group, I can't do that via the cli. Here's an example policy below
```
{
"isEnabled": true,
"isBlocking": true,
"type": {
"id": "i-dont-think-this-val-is-sensitive-but-censoring-anyway"
},
"settings": {
"creatorVoteCounts": false,
"message": "Approval is required for test repo",
"minimumApproverCount": 1,
"requiredReviewerIds": [
"test-id"
],
"scope": [
{
"matchKind": "Exact",
"refName": "refs/heads/main",
"repositoryId": "test-repo-id"
}
]
}
}
```
I can implement that above by running say `az repos policy update --id test-policy-id --config .\sample_config.json`
BUT, I don't see a parameter that fulfills these settings in the documentation for the `az repos policy required-reviewer` commands. I see:
```
az repos policy required-reviewer create --blocking {false, true}
--branch
--enabled {false, true}
--message
--repository-id
--required-reviewer-ids
[--branch-match-type {exact, prefix}]
[--detect {false, true}]
[--org]
[--path-filter]
[--project]
```
**Describe the solution you'd like**
I'd like for there to be parameters to the above command that replicates the functionality of the reviewer policy screen:

I think all that's missing is that "Completion options" bit
**Describe alternatives you've considered**
I can implement that above by running say `az repos policy update --id test-policy-id --config .\sample_config.json`
**Additional context**
None
Contributor guide
Assessment
This issue has not been assessed yet.