According to the V2 documentation, you can list all commits for a branch with:
commits/list/:user_id/:repository/:branch
I am not seeing th
I asked this same question for GitHub support, and they answered me this:
GETing /repos/:owner/:repo/commits should do the trick. You can pass the branch name in the
shaparameter. For example, to get the first page of commits from the '3.0.0-wip' branch of the twitter/bootstrap repository, you would use the following curl request:curl https://api.github.com/repos/twitter/bootstrap/commits?sha=3.0.0-wipThe docs also describe how to use pagination to get the remaining commits for this branch.
As long as you are making authenticated requests, you can make up to 5,000 requests per hour.
I used the rails github-api in my app as follows(using https://github.com/peter-murach/github gem):
github_connection = Github.new :client_id => 'your_id', :client_secret => 'your_secret', :oauth_token => 'your_oath_token'
branches_info = {}
all_branches = git_connection.repos.list_branches owner,repo_name
all_branches.body.each do |branch|
branches_info["#{branch.name}".to_s] = "#{branch.commit.url}"
end
branches_info.keys.each do |branch|
commits_list.push (git_connection.repos.commits.list owner,repo_name, start_date, end_date, :sha => "branch_name")
end