Method: Gitlab::Client::Branches#protected_branches

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

#protected_branches(project) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: repo_protected_branches

Gets a list of protected branches from a project.

Examples:

Gitlab.protected_branches(42)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

Returns:

[View source]

117
118
119
# File 'lib/gitlab/client/branches.rb', line 117

def protected_branches(project)
  get("/projects/#{url_encode project}/protected_branches")
end