class Github::GitData::References

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


github.git_data.references.list 'user-name', 'repo-name', ref:'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, params={})
  set :user => user_name, :repo => repo_name
  assert_presence_of user, repo
  normalize! params
  response = if params['ref']
    ref = params.delete('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