- 
      
- 
        Save badboy/5817044 to your computer and use it in GitHub Desktop. 
Revisions
- 
        badboy revised this gist Jun 21, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,7 +51,6 @@ File.open(path, "w") do |f| comments = client.issue_comments(repo.full_name, issue.number) f.puts "\##{issue.number} #{issue.title}" f.puts "By #{issue.user.login} on #{issue.created_at}" f.puts "Labels: #{issue.labels.join(" ")}" unless issue.labels.empty? f.puts 
- 
        badboy revised this gist Jun 19, 2013 . 1 changed file with 11 additions and 10 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,21 +11,21 @@ repos = $* options = { :login => %x[ git config --get github.user ].strip, :oauth_token => %x[ git config --get github.token ].strip } client = Octokit::Client.new( options ) key_width = 15 label_color = Hash.new( :cyan ) label_color['bug'] = :red label_color['feature'] = :green label_color['todo'] = :blue client.list_repos.each do |repo| next if repo.fork next unless repo.open_issues > 0 next if repos.size > 0 && !repos.include?(repo.name) @@ -36,30 +36,31 @@ print "Issue Count : ".rjust( key_width ).foreground( :yellow ).bright puts repo.open_issues client.issues( repo.full_name ).each do |issue| print ("%3d : " % issue.number).rjust( key_width).foreground( :white ).bright labels = [] unless issue.labels.empty? issue.labels.each do |l| labels << l.name.foreground( label_color[l] ).bright end end print labels.join(' ') + " " puts issue.title path = "issues/#{repo.name}/issue-#{issue.number}.txt" unless File.exist? path File.open(path, "w") do |f| comments = client.issue_comments(repo.full_name, issue.number) f.puts "\##{issue.number} #{issue.title}" require 'pry'; binding.pry f.puts "By #{issue.user.login} on #{issue.created_at}" f.puts "Labels: #{issue.labels.join(" ")}" unless issue.labels.empty? f.puts f.puts issue.body f.puts f.puts "Comments: #{comments.size}" comments.each do |comment| f.puts "--------" f.puts "From #{comment.user.login} on #{comment.created_at}" f.puts f.puts comment.body f.puts 
- 
        ryanb revised this gist May 15, 2011 . 2 changed files with 21 additions and 54 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ First install the required gems: ```bash gem install octokit awesomeprint rainbow ``` Then run it to extract all of your open GitHub issues into files (with comments). ```bash ruby my-gh-issues.rb ``` Take a look at the issue directory for all issues. Pass specific repositories to only pull those issues. ```bash ruby my-gh-issues.rb cancan railscasts ``` Note, you may get a 403 error if you have a lot of issues. I'm guessing this is because GitHub is throttling how many requests you can send. Just run the script again and it will skip over the already pulled issues. Special thanks to the creator of this [original gist](https://gist.github.com/960999) and the authors of the gems. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,54 +0,0 @@ 
- 
        ryanb revised this gist May 15, 2011 . 1 changed file with 25 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,13 @@ # A quick script to dump an overview of all the open issues in all my github projects # require 'fileutils' require 'octokit' require 'awesome_print' require 'rainbow' repos = $* options = { :login => %x[ git config --get github.user ].strip, :token => %x[ git config --get github.token ].strip @@ -24,9 +27,11 @@ client.list_repos.each do |repo| next if repo.fork next unless repo.open_issues > 0 next if repos.size > 0 && !repos.include?(repo.name) print "Repository : ".rjust( key_width ).foreground( :green ).bright puts repo.name FileUtils.mkdir_p("issues/#{repo.name}") unless File.exist? "issues/#{repo.name}" print "Issue Count : ".rjust( key_width ).foreground( :yellow ).bright puts repo.open_issues @@ -41,6 +46,26 @@ end print labels.join(' ') + " " puts issue.title path = "issues/#{repo.name}/issue-#{issue.number}.txt" unless File.exist? path File.open(path, "w") do |f| comments = client.issue_comments(repo, issue.number) f.puts "\##{issue.number} #{issue.title}" f.puts "By #{issue.user} on #{issue.created_at}" f.puts "Labels: #{issue.labels.join(" ")}" unless issue.labels.empty? f.puts f.puts issue.body f.puts f.puts "Comments: #{comments.size}" comments.each do |comment| f.puts "--------" f.puts "From #{comment.user} on #{comment.created_at}" f.puts f.puts comment.body f.puts end end end end puts end 
- 
        copiousfreetime revised this gist May 8, 2011 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ #!/usr/bin/env ruby # # A quick script to dump an overview of all the open issues in all my github projects # require 'octokit' require 'awesome_print' require 'rainbow' 
- 
        copiousfreetime revised this gist May 8, 2011 . 1 changed file with 54 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ jeremy@aramis:~ ruby-1.9.2-p180 % my-gh-issues Repository : amalgalite Issue Count : 5 11 : todo Look at NestedVM and see if that is a way to add jruby support 12 : todo check the behavior of sqlite3_step and make sure we do the right thing 13 : feature expand the import from csv functionality to automatically create a table from the data 14 : Various patches around in-memory databases 15 : bug Be more specific on checking sqlite $LOADED_FEATURES Repository : launchy Issue Count : 5 5 : bug Problems launching urls with querystring in Windows 7 : bug Launchy::Browser#run with spaces in the page (on Windows) 8 : bug Fix for http://github.com/copiousfreetime/launchy/issues#issue/7 9 : bug launchy launching a command prompt instead of a browser on Win XP 13 : Launchy doesn't seem to play well with growl and spork Repository : keybox Issue Count : 1 2 : bug Keybox does not work in ruby 1.9 Repository : stickler Issue Count : 10 4 : bug stickler mirror does not work 6 : feature Add a Label to the gems to show which repository that gem is in local/mirror etc. 7 : feature Add in mirroring proxy. 8 : feature Add support for X-Sendfile or similar capability for serving up the .gem and .spec files. 9 : feature Add 'unyank' support 10 : feature Expose the 'delete' command 11 : feature Add in an 'unmirror' or similar command for removing a gem from the mirror repo 12 : feature Authentication support 13 : feature Allow a bundler Gemfile to be used as input for 'mirror' command 14 : feature when mirroring or pushing a gem, have stickler pull in the dependencies automatically for mirroring Repository : hitimes Issue Count : 2 3 : bug Make sure that hitimes can be built from the github repo 4 : feature could we get Hitimes.measure too? Repository : crate Issue Count : 2 1 : fix in gem_integration.rb 2 : Update Crate to Ruby 1.9 Repository : tyrantmanager Issue Count : 3 8 : bug Two additional gem dependencies 9 : bug Doc bug 11 : bug undefined method `instances' for nil:NilClass Repository : gemology Issue Count : 2 1 : feature extract a generic webhook server with callbacks from the code 2 : todo Double check all the extracted data from the gem file and make sure it is in the database. 
- 
        copiousfreetime created this gist May 8, 2011 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ #!/usr/bin/env ruby require 'octokit' require 'awesome_print' require 'rainbow' options = { :login => %x[ git config --get github.user ].strip, :token => %x[ git config --get github.token ].strip } client = Octokit::Client.new( options ) key_width = 15 label_color = Hash.new( :cyan ) label_color['bug'] = :red label_color['feature'] = :green label_color['todo'] = :blue client.list_repos.each do |repo| next if repo.fork next unless repo.open_issues > 0 print "Repository : ".rjust( key_width ).foreground( :green ).bright puts repo.name print "Issue Count : ".rjust( key_width ).foreground( :yellow ).bright puts repo.open_issues client.issues( repo ).each do |issue| print ("%3d : " % issue.number).rjust( key_width).foreground( :white ).bright labels = [] if not issue.labels.empty? then issue.labels.each do |l| labels << l.foreground( label_color[l] ).bright end end print labels.join(' ') + " " puts issue.title end puts end