Skip to content

Instantly share code, notes, and snippets.

@nicksieger
Forked from copiousfreetime/my-gh-issues.rb
Created July 26, 2011 16:06
Show Gist options
  • Save nicksieger/1107120 to your computer and use it in GitHub Desktop.
Save nicksieger/1107120 to your computer and use it in GitHub Desktop.
My Github Issues
source :rubygems
gem 'octokit'
gem 'awesome_print'
gem 'rainbow'
gem 'jruby-openssl'
GEM
remote: http://rubygems.org/
specs:
addressable (2.2.6)
awesome_print (0.4.0)
bouncy-castle-java (1.5.0145.2)
faraday (0.7.4)
addressable (~> 2.2.6)
multipart-post (~> 1.1.0)
rack (>= 1.1.0, < 2)
faraday_middleware (0.7.0.rc1)
faraday (~> 0.7.3)
hashie (1.0.0)
jruby-openssl (0.7.1)
bouncy-castle-java
multi_json (1.0.3)
multipart-post (1.1.3)
octokit (0.6.4)
addressable (~> 2.2.6)
faraday (~> 0.7.3)
faraday_middleware (~> 0.7.0.rc1)
hashie (~> 1.0.0)
multi_json (~> 1.0.2)
rack (1.3.2)
rainbow (1.1.1)
PLATFORMS
java
DEPENDENCIES
awesome_print
jruby-openssl
octokit
rainbow
#!/bin/bash
exec ruby -x -rubygems $0
#!/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'
options = {
:login => %x[ git config --get github.user ].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 + client.org_repos("jruby")).each do |repo|
begin
next if repo.fork
next unless repo.open_issues > 0
print "Repository : ".rjust( key_width ).foreground( :green ).bright
puts "#{repo.owner}/#{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
sleep 1 # avoid rate limits
rescue
p $!
next
end; end
# Local Variables:
# mode: ruby
# End:
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.
#!/bin/bash
exec ruby -x -rubygems $0
#!/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'
options = {
:login => %x[ git config --get github.user ].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 + client.org_repos("jruby")).each do |repo|
begin
next if repo.fork
pulls = client.pulls(repo)
next unless pulls.length > 0
print "Repository : ".rjust( key_width ).foreground( :green ).bright
puts "#{repo.owner}/#{repo.name}"
print "Pull Count : ".rjust( key_width ).foreground( :yellow ).bright
puts pulls.length
pulls.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
sleep 1 # avoid rate limits
rescue
p $!
next
end; end
# Local Variables:
# mode: ruby
# End:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment