azure-devops-cli-extension
azure-devops-cli-extension copied to clipboard
[Feature Request] Set required reviewers on a PR
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]
Still relevant functionality
I created a pull request related to that issue: #1363