Skip to content

Commit c2f8f0e

Browse files
committed
fix: honor parameter value passed
Gitlab allows setting the defaults for MR to delete the source. Also the inline help of the CLI suggest that a boolean is expected, but no matter what value you set, it will always delete.
1 parent 9fcd962 commit c2f8f0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab/v4/objects/merge_requests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ def merge(
312312
data = {}
313313
if merge_commit_message:
314314
data["merge_commit_message"] = merge_commit_message
315-
if should_remove_source_branch:
316-
data["should_remove_source_branch"] = True
315+
if should_remove_source_branch is not None:
316+
data["should_remove_source_branch"] = should_remove_source_branch
317317
if merge_when_pipeline_succeeds:
318318
data["merge_when_pipeline_succeeds"] = True
319319

0 commit comments

Comments
 (0)