Module: Octokit::Client::CommitBranches

Included in:
Octokit::Client
Defined in:
lib/octokit/client/commit_branches.rb

Overview

Methods for the Branches for HEAD API

Instance Method Summary collapse

Instance Method Details

#commit_branches(repo, sha, options = {}) ⇒ Array

List branches for a single HEAD commit

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

  • sha (String)

    The SHA of the commit whose branches will be fetched

Returns:

  • (Array)

    List of branches

See Also:



15
16
17
# File 'lib/octokit/client/commit_branches.rb', line 15

def commit_branches(repo, sha, options = {})
  paginate "#{Repository.path repo}/commits/#{sha}/branches-where-head", options
end