Reputation: 205
We have a dedicated process for pull requests in DevOps. The issue is that sometimes developers are merging they're changes during a review. This leads to more complex code reviews since the code changes during the review.
Is there a way to block/protect a pull request (or the underlying branch) to be changed while the review is in progress?
lets say the reviewer starts reviewing and to be able to review without additional changes the reviewer sets the branch to "protected" until he finishes the review. After finishing the review the reviewer opens the branch for the developer which has then to fix the suggested things in the code.
is there a way?
Upvotes: 0
Views: 965
Reputation: 35194
Is there a way to block/protect a pull request (or the underlying branch) to be changed while the review is in progress?
As far as I know, you could try to use the Lock
feature in Repos -> Branches.
If the branch is locked, other users couldn't commit changes to the locked branch and complete a pull request for the locked branch.
Note:Only user who has locked the branch can commit changes and complete pull request.
After finishing the code review, the reviewer could unlock the branch. Then other users could change the branch content.
Here is a doc about the git branch lock feature.
Upvotes: 3