"Remove source branch" does not remove for manual merge
"Remove source branch when merge request is accepted" does not remove the branch when manual merge is performed.
Steps to reproduce
- Create a merge request and check "Remove source branch when merge request is accepted" option.
- Merge branch manually
What is the current bug behavior?
Source branch is not removed.
What is the expected correct behavior?
Source branch is removed
When we process changes from a manual merge the method responsible for closing merge requests is
MergeRequests::RefreshService#close_merge_requests. It calls
MergeRequests::PostMergeService#execute. The code responsible for removing the source branch is in
MergeRequests::MergeService#after_merge. This service is only called on a merge via web UI. We should push code responsible for removing the source branch to