azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

[Feature Request] Set required reviewers on a PR

Open eedrah opened this issue 4 years ago • 2 comments

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]

eedrah avatar Oct 08 '20 21:10 eedrah

Still relevant functionality

Igor1306 avatar Nov 15 '22 12:11 Igor1306

I created a pull request related to that issue: #1363

Apollo-Roboto avatar Aug 02 '23 02:08 Apollo-Roboto