Approvals not reset if changing target branch
Fix
Per https://gitlab.com/gitlab-org/gitlab-ee/issues/2166#note_27575872:
We should just treat a change of target branch like a push, so if you have this setting enabled:
Then we'd reset the approvals.
Summary
If you create a MR and with the right number of approvals, you can change target branch (even if both are protected) and approvals are not reset.
Steps to reproduce
- Create a merge request that requires a number of approvals
- Add approvals
- Change target branch
What is the current bug behavior?
Approvals are not reset
What is the expected correct behavior?
Approvals should be reset
Relevant logs and/or screenshots
GitLab version
9.0.5-ee