Method: Gitlab::Client::Branches#unprotect_branch

Defined in:
lib/gitlab/client/branches.rb

#unprotect_branch(project, branch) ⇒ Gitlab::ObjectifiedHash Also known as: repo_unprotect_branch

Unprotects a repository branch.

Examples:

Gitlab.unprotect_branch(3, 'api')
Gitlab.repo_unprotect_branch(5, 'master')

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • branch (String)

    The name of the branch.

Returns:


65
66
67
# File 'lib/gitlab/client/branches.rb', line 65

def unprotect_branch(project, branch)
  delete("/projects/#{url_encode project}/protected_branches/#{url_encode branch}")
end