Skip to content

Fix force_remove_source_branch not working in API

Stan Hu requested to merge sh-fix-issue-219991 into master

When an MR is merged via the API without should_remove_source_branch set, the branch is always retained, even if force_remove_source_branch is set to true in the MR merge params. This was happening because the API always passed a should_remove_source_branch with a nil value, and MergeService interpreted this as false.

To fix this, we strip nil values from the merge_params.

Relates to #219991 (closed)

Edited by Stan Hu

Merge request reports