Method: Gitlab::Client::Branches#branch

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

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

Gets information about a repository branch.

Examples:

Gitlab.branch(3, 'api')
Gitlab.repo_branch(5, 'master')

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • branch (String)

    The name of the branch.

Returns:

[View source]

31
32
33
# File 'lib/gitlab/client/branches.rb', line 31

def branch(project, branch)
  get("/projects/#{url_encode project}/repository/branches/#{url_encode branch}")
end