From 01db0d855a8e5ffe71ac4b7da201ae85a2cec73c Mon Sep 17 00:00:00 2001 From: Ferhat Aram Date: Fri, 19 Jun 2020 16:15:20 +0200 Subject: [PATCH 1/4] fix(gitlab): invoke gitlab merge with arguments as expected --- pyup/providers/gitlab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyup/providers/gitlab.py b/pyup/providers/gitlab.py index 5b56463..e4af27c 100644 --- a/pyup/providers/gitlab.py +++ b/pyup/providers/gitlab.py @@ -171,7 +171,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(remove_source_branch=config.gitlab.should_remove_source_branch, + mr.merge(should_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): From 4d6446a5a5b3749dd4a7166a29d9ab44da0ee04d Mon Sep 17 00:00:00 2001 From: Ferhat Aram Date: Fri, 19 Jun 2020 17:24:35 +0200 Subject: [PATCH 2/4] fix(test): Adjust gitlab test cases on change --- tests/test_gitlab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_gitlab.py b/tests/test_gitlab.py index 224fc54..09b0d2d 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, - remove_source_branch=False) + source_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, - remove_source_branch=True) + source_remove_source_branch=True) def test_create_pull_request_with_exceeding_body(self): body = ''.join(["a" for i in range(0, 65536 + 1)]) From e1f84942504c413bf0cd404a80c9cffaae3b25d1 Mon Sep 17 00:00:00 2001 From: Ferhat Aram Date: Fri, 19 Jun 2020 17:52:53 +0200 Subject: [PATCH 3/4] fix(test): fix gitlab test fix --- tests/test_gitlab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_gitlab.py b/tests/test_gitlab.py index 09b0d2d..6c49b4e 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, - source_remove_source_branch=False) + should_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, - source_remove_source_branch=True) + should_remove_source_branch=True) def test_create_pull_request_with_exceeding_body(self): body = ''.join(["a" for i in range(0, 65536 + 1)]) From 3d5074e4553e00366da3b3e284d2618250321915 Mon Sep 17 00:00:00 2001 From: Rafael Pivato Date: Sun, 27 Dec 2020 14:03:52 -0300 Subject: [PATCH 4/4] Mention GitLab merge fix --- HISTORY.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 508a229..188b909 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,9 @@ History 1.1.2a (current) ---------------- * Current unstable +* Fixed `#384`_ affecting GitLab automatic merge + +.. _#384: https://github.com/pyupio/pyup/issues/384 1.1.1 (2020-05-01) ------------------