diff --git a/pyup/providers/gitlab.py b/pyup/providers/gitlab.py index bfb3468..04ee068 100644 --- a/pyup/providers/gitlab.py +++ b/pyup/providers/gitlab.py @@ -168,7 +168,7 @@ def close_pull_request(self, bot_repo, user_repo, pull_request, comment, prefix) self.delete_branch(user_repo, source_branch, prefix) def _merge_merge_request(self, mr, config): - mr.merge(should_remove_source_branch=config.gitlab.should_remove_source_branch, + mr.merge(remove_source_branch=config.gitlab.should_remove_source_branch, merge_when_pipeline_succeeds=True) def create_pull_request(self, repo, title, body, base_branch, new_branch, pr_label, assignees, config): @@ -184,7 +184,7 @@ def create_pull_request(self, repo, title, body, base_branch, new_branch, pr_lab 'title': title, 'description': body, 'pr_label': pr_label, - 'should_remove_source_branch': config.gitlab.should_remove_source_branch + 'remove_source_branch': config.gitlab.should_remove_source_branch }) if config.gitlab.merge_when_pipeline_succeeds: diff --git a/tests/test_gitlab.py b/tests/test_gitlab.py index 5aaa2d5..a40bbf3 100644 --- a/tests/test_gitlab.py +++ b/tests/test_gitlab.py @@ -211,7 +211,7 @@ def test_merge_pull_request(self): config = Config() self.provider._merge_merge_request(mr, config) mr.merge.assert_called_once_with(merge_when_pipeline_succeeds=True, - should_remove_source_branch=False) + remove_source_branch=False) def test_merge_pull_request_with_remove(self): mr = Mock() @@ -220,7 +220,7 @@ def test_merge_pull_request_with_remove(self): config.update_config({'gitlab': {'should_remove_source_branch': True}}) self.provider._merge_merge_request(mr, config) mr.merge.assert_called_once_with(merge_when_pipeline_succeeds=True, - should_remove_source_branch=True) + remove_source_branch=True) def test_create_pull_request_with_exceeding_body(self): body = ''.join(["a" for i in range(0, 65536 + 1)])