From 232fab702fe8cf67353828afd1d29a65bc0faf51 Mon Sep 17 00:00:00 2001 From: ethinx Date: Tue, 12 Apr 2022 18:15:43 +0800 Subject: [PATCH 1/3] remove deprecated branch.protect method --- plugins/modules/source_control/gitlab/gitlab_branch.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/modules/source_control/gitlab/gitlab_branch.py b/plugins/modules/source_control/gitlab/gitlab_branch.py index ce71a00a9b7..8707e6453ab 100644 --- a/plugins/modules/source_control/gitlab/gitlab_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_branch.py @@ -110,7 +110,6 @@ def create_branch(self, branch, ref_branch): return self.project.branches.create({'branch': branch, 'ref': ref_branch}) def delete_branch(self, branch): - branch.unprotect() return branch.delete() From 9e2ec5e63825ec858ccb1593a6a8d1d63e5332e0 Mon Sep 17 00:00:00 2001 From: ethinx Date: Wed, 13 Apr 2022 13:42:04 +0800 Subject: [PATCH 2/3] add changelog fragment --- .../4496-remove-deprecated-method-in-gitlab-branch-module.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml diff --git a/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml b/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml new file mode 100644 index 00000000000..19fec0e159c --- /dev/null +++ b/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml @@ -0,0 +1,2 @@ +bugfixes: + - git_branch - remove deprecated branch `protect`/`unprotect` method (https://github.com/ansible-collections/community.general/pull/4496). From 60f9e3d65ab5045d59bfa0e3a6ba0fd7b7e71140 Mon Sep 17 00:00:00 2001 From: ethinx Date: Wed, 13 Apr 2022 13:58:42 +0800 Subject: [PATCH 3/3] Update changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml Co-authored-by: Felix Fontein --- .../4496-remove-deprecated-method-in-gitlab-branch-module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml b/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml index 19fec0e159c..07329367e77 100644 --- a/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml +++ b/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml @@ -1,2 +1,2 @@ bugfixes: - - git_branch - remove deprecated branch `protect`/`unprotect` method (https://github.com/ansible-collections/community.general/pull/4496). + - git_branch - remove deprecated and unnecessary branch ``unprotect`` method (https://github.com/ansible-collections/community.general/pull/4496).