Azure / Azure/azure-devops-cli-extension

[Feature Request] Set required reviewers on a PR

Open
#1,060 2 comments 28 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**
I cannot set required reviewers on a PR

**Describe the solution you'd like**
Currently we can set optional reviewers with `az repos pr create --reviewers 12817241-2342-9867-983749829`

I propose the following, which also would clarify the intent of the flag:

```
az repos pr create --optional-reviewers 12817241-2342-9867-983749829
az repos pr create --required-reviewers 12817241-2342-9867-983749829

# Together, with multiple reviewers
az repos pr create --optional-reviewers 12817241-2342-9867-983749829 12056785-2342-3623-5458345 --required-reviewers abcdef3-8455-4577-23592324 ebadad-3477-4563-abedceda6
```

If backward compatibility is required then the `--reviewers` flag could be maintained as an alias for `--optional-reviewers`

# az repos pr reviewer add

In addition, the `az repos pr reviewer add` command should take a parameter indicating if the reviewer is required or not. A simple `--required` flag could do it. I believe the rest of the CLI uses the `--required true` pattern though, like the following:

```
az repos pr reviewer add --id
--reviewers
[--required {false, true}]
[--detect {false, true}]
[--org]
```

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.