Method: Gitlab::Client::Branches#branches

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

#branches(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: repo_branches

Gets a list of project repositiory branches.

Examples:

Gitlab.branches(42)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :page (Integer)

    The page number.

  • :per_page (Integer)

    The number of results per page.

Returns:


17
18
19
# File 'lib/gitlab/client/branches.rb', line 17

def branches(project, options = {})
  get("/projects/#{url_encode project}/repository/branches", query: options)
end