Created
March 15, 2014 00:48
-
-
Save tsnow/9560111 to your computer and use it in GitHub Desktop.
Pi Day with Github Archive http://www.githubarchive.org/
This file contains 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 characters
require 'open-uri' | |
require 'zlib' | |
require 'yajl' | |
(1..24).to_a.reverse.each do |i| | |
gz=open("http://data.githubarchive.org/2014-03-14-#{i}.json.gz") rescue nil; | |
next if gz.nil?; | |
js = Zlib::GzipReader.new(gz).read; | |
Yajl::Parser.parse(js) do |event| | |
if %w(PullRequestEvent).include? event['type'] | |
number = event['payload']['number'].to_i | |
if number == 314 | |
puts event['payload']['pull_request']['html_url'] | |
end | |
end | |
end | |
end | |
# https://github.com/thedjpetersen/subway/pull/314 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment