Remove approval in merge request
Resources
PM @victorwu
Problem
During code review of a merge request, suppose you (an allowed approver), approves the merge request. You realized you missed something and you want to take back your approval. Or you might see something so terrible that you want to block / veto the merge request (#761). Currently GitLab does not provide any of these solutions.
Dependencies
- #1262 (closed) re-designs the approvals UI to get ready for this and future features. That issue should be implemented and merged into master before this one is started.
- This merge request for this issue should only contain this issue and no other scope.
Smallest iteration in scope
- Provide a mechanism to remove your approval for a merge request that hasn't been merged yet.
- This only impacts your own approval. It doesn't directly impact the approvals of others.
- The merge request state changes automatically based on your unapprove and approve actions. (I.e. if the number of approvals are enough, the merge request can be accepted by someone with permissions to do so.)
Out of scope
- When a merge request is approved totally, all pending todos are marked done in the existing functionality. It is not clear what should happen if a merge request subsequently flips back since somebody removed their approval. That is, any secondary consequences to todos are outside of the scope of this issue.
Design considerations
- The UI should easily allow you to approve and remove.
- The UI should not mislead you to think that your actions will impact other people's approvals.
- The UI should not mislead you to think that you can block / veto the merge request.
Design mock-ups
One more approval is required. I can remove my approval.
The number of approvals is fulfilled. I can remove my approval. I don't have permissions to merge the merge request.
The number of approvals is fulfilled. I can remove my approval. I do have permissions to merge the merge request.
Links / references
- Docs on approvals: https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html
cc @DouweM
Edited by Coung Ngo