9
votes

Setup

Master branch policies: When new changes are pushed: reset all approval votes

  • Create a Pull Request (PR1) from dev branch to master branch
  • VSTS performs policy checks.

enter image description here

  • Before the user is able to complete the PR1, another PR (PR2) is completed and merged to master.

Issue/Question The PR1 status still says "No merge conflict/last checked # minutes ago"; however, that may no longer be the case since the target (master) branch was updated. If the user performs a merge locally (merge master (PR2) to dev) and pushes the newly merged code, the votes get reset. Now the user has to wait for reviews again.

Is there a way to either trigger merge conflict check manually in a PR, or to NOT reset votes if the user pushed new changes, but those changes are just a "merge from master".

1

1 Answers

11
votes

Is there a way to either trigger merge conflict check manually in a PR, or to NOT reset votes if the user pushed new changes, but those changes are just a "merge from master"

We provided one button can help you achieve triggering merge conflict check manually.

Just pls firstly click on the three dots button on the upper right corner of the PR1 page => Click on Restart merge to re-check the merge conflicts:

enter image description here

Then you will see the conflict check start and prompt you the result of checking.

As normal, the active PRs' policy checking will be live updated automatically if someone made changes on Branch policy. But for conflicts re-checking, you have to click on Restart merge manually to start the live update.

BUT, I'm afraid the approved votes should be reset if you decide to apply some changes to dev branch after checking&review the new conflicts. According to the logic of review, the approved votes are for your changes in the previous version. Now, if you decide to apply some new changes to your dev branch, the changes that will be merged to the master branch at this time have changed. I think it’s better to review it again.