Use the current_user of the merge action to delete the source branch
Use the user of the merge action to perform the deletion of the source branch.
Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/497498
Epic: https://gitlab.com/groups/gitlab-org/-/epics/15714
To Test:
- Turn on feature
Feature.enable(:switch_deletion_branch_user)
- Create an MR as user 1
- Merge as user 2
- Check in the user 2 activity, that they are deleted the branch
- Check in the user 1 activity, they are did not delete the branch
Edited by Marc Shaw