Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
628 stars 241 forks source link

Set Required Reviewers on Pull Request #1363

Closed Apollo-Roboto closed 8 months ago

Apollo-Roboto commented 1 year ago

Related issue: #1060

Please make sure the code is following contribution guidelines in CONTRIBUTING.md


az repos pr create

Added 2 new parameters --required-reviewers and --optional-reviewers. I kept the original --reviewers parameter which still adds optional reviewers.

If the same reviewer is added as both required and optional, it will only be set as required.

az repos pr reviewers add

Added a new parameter --required that can make the list of reviewers being added required or optional.


Implementation wasn't too complicated since the azure-devops library already had support for the is_required field on the IdentityRefWithVote class.

Apollo-Roboto commented 1 year ago

hold on it broke fixed

luk355 commented 8 months ago

@v-anvashist, @V-hmusukula, any chance this PR can be reviewed and merged, please? I would also really welcome the fact that you can set the reviewer as Required.

v-anvashist commented 8 months ago

HI @luk355 I can see some conflicts in this PR.

Apollo-Roboto commented 8 months ago

I will take another look and fix the conflicts

Apollo-Roboto commented 8 months ago

I had to modify the implementation a little to fit with within the 20 branching limit from pylint. The checks have passed and it's now ready for review!