Method: Gitlab::Client::Commits#commit_refs

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

#commit_refs(project, sha, options = {}) ⇒ Gitlab::ObjectifiedHash

Get all references (from branches or tags) a commit is pushed to.

Examples:

Gitlab.commit_refs(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6')

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • sha (String)

    The commit hash

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

    A customizable set of options.

Options Hash (options):

  • :type (String)

    The scope of commits. Possible values branch, tag, all. Default is all.

  • :page (Integer)

    The page number.

  • :per_page (Integer)

    The number of results per page.

Returns:



50
51
52
# File 'lib/gitlab/client/commits.rb', line 50

def commit_refs(project, sha, options = {})
  get("/projects/#{url_encode project}/repository/commits/#{sha}/refs", query: options)
end