Skip to content

Instantly share code, notes, and snippets.

@EricZeiberg
Created August 14, 2014 19:32
Show Gist options
  • Save EricZeiberg/da596bf3bdfc3f83065a to your computer and use it in GitHub Desktop.
Save EricZeiberg/da596bf3bdfc3f83065a to your computer and use it in GitHub Desktop.
Octokit issue
def index
config = YAML.load_file("#{Rails.root}/config/github.yml")[Rails.env]
client = Octokit::Client.new(:access_token => "[REDACTED]")
user = client.user
user.login
Octokit.auto_paginate = true
repo = 'MasterEjay/Blog'
@name = 'Blog'
@desc = 'These are the latest changes to the blog'
unpaginated = client.commits(repo, :per_page => 10000)
@commits = unpaginated.paginate(:page => params[:page], :per_page => 15)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment