diff options
author | Jonathan Vogt <jonathan.vogt@allcloud.io> | 2021-02-15 13:55:14 +0100 |
---|---|---|
committer | Jonathan Vogt <jonathan.vogt@allcloud.io> | 2021-02-15 13:55:14 +0100 |
commit | c2f8f0e7db9529e1f1f32d790a67d1e20d2fe052 (patch) | |
tree | b87a9b1927a2c392630163c28c53c634a528588e | |
parent | 9fcd9623fd8c89347202cd5a2e90e68ee2780f41 (diff) | |
download | gitlab-c2f8f0e7db9529e1f1f32d790a67d1e20d2fe052.tar.gz |
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.
-rw-r--r-- | gitlab/v4/objects/merge_requests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/v4/objects/merge_requests.py b/gitlab/v4/objects/merge_requests.py index dd37ada..f6c5611 100644 --- a/gitlab/v4/objects/merge_requests.py +++ b/gitlab/v4/objects/merge_requests.py @@ -312,8 +312,8 @@ class ProjectMergeRequest( 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 |