Skip to content

Instantly share code, notes, and snippets.

@aliou
Created December 15, 2012 22:03
Show Gist options
  • Save aliou/4299687 to your computer and use it in GitHub Desktop.
Save aliou/4299687 to your computer and use it in GitHub Desktop.
issue backup
require 'json'
require 'github_api'
github = Github.new basic_auth: 'USERNAME:PASSWORD'
issues = []
tmp = github.issues.list :user => 'USERNAME', :repo => 'REPONAME', :state => 'closed'
issues << tmp
tmp = github.issues.list :user => 'USERNAME', :repo => 'REPONAME', :state => 'open'
issues << tmp
# order by id
puts JSON.pretty_generate issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment