From 90d31b940383e46f3a0fa149f2d53e04db8c2998 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:04:51 +0200 Subject: [PATCH] remove deprecated branch.unprotect() method in community.general.gitlab_branch (#4496) (#4528) * 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 (cherry picked from commit a8abb1a5bfbb9e8a39c2b799d5ef485be073ffcc) Co-authored-by: York Wong --- .../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 0000000000..07329367e7 --- /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 ce71a00a9b..8707e6453a 100644 --- a/plugins/modules/source_control/gitlab/gitlab_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_branch.py @@ -110,7 +110,6 @@ class GitlabBranch(object): return self.project.branches.create({'branch': branch, 'ref': ref_branch}) def delete_branch(self, branch): - branch.unprotect() return branch.delete()