class Github::GitData::References

def list(user_name, repo_name, ref=nil, params={})


github.git_data.references.list 'user-name', 'repo-name', 'tags'

github.git_data.references.list 'user-name', 'repo-name'
github = Github.new
= Examples

though that would be the most common.
Anything in the namespace, not just heads and tags,
including things like notes and stashes if they exist on the server.
This will return an array of all the references on the system,

Get all references
def list(user_name, repo_name, ref=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  response = if ref
    _validate_reference ref
    get_request("/repos/#{user}/#{repo}/git/refs/#{ref}", params)
  else
    get_request("/repos/#{user}/#{repo}/git/refs", params)
  end
  return response unless block_given?
  response.each { |el| yield el }
end