module Github::Repos::Commits

def commits(user_name=nil, repo_name=nil, params={})


@github.repos.commits 'user-name', 'repo-name', :sha => '...' { |commit| ... }
@github.repos.commits 'user-name', 'repo-name', :sha => '...'
@github = Github.new
= Examples

* :path Optional string. Only commits containing this file path will be returned
* :sha Optional string. Sha or branch to start listing commits from.
= Parameters

List commits on a repository
def commits(user_name=nil, repo_name=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  _filter_params_keys(%w[ sha path], params)
  response = get("/repos/#{user}/#{repo}/commits", params)
  return response unless block_given?
  response.each { |el| yield el }
end