From a8abb1a5bfbb9e8a39c2b799d5ef485be073ffcc Mon Sep 17 00:00:00 2001 From: York Wong Date: Wed, 20 Apr 2022 00:26:09 +0800 Subject: [PATCH] remove deprecated branch.unprotect() method in community.general.gitlab_branch (#4496) * remove deprecated branch.protect method * add changelog fragment * Update changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../4496-remove-deprecated-method-in-gitlab-branch-module.yml | 2 ++ plugins/modules/source_control/gitlab/gitlab_branch.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) 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..07329367e77 --- /dev/null +++ b/changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml @@ -0,0 +1,2 @@ +bugfixes: + - git_branch - remove deprecated and unnecessary branch ``unprotect`` method (https://github.com/ansible-collections/community.general/pull/4496). 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()