Skip to content

Commit

Permalink
fix: honor parameter value passed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bitte-ein-bit committed Feb 15, 2021
1 parent 9fcd962 commit c2f8f0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitlab/v4/objects/merge_requests.py
Expand Up @@ -312,8 +312,8 @@ def merge(
data = {}
if merge_commit_message:
data["merge_commit_message"] = merge_commit_message
if should_remove_source_branch:
data["should_remove_source_branch"] = True
if should_remove_source_branch is not None:
data["should_remove_source_branch"] = should_remove_source_branch
if merge_when_pipeline_succeeds:
data["merge_when_pipeline_succeeds"] = True

Expand Down

0 comments on commit c2f8f0e

Please sign in to comment.