Skip to content

Instantly share code, notes, and snippets.

@hamiltont
Created April 3, 2015 23:47
Show Gist options
  • Save hamiltont/cfd7201d196d0d232371 to your computer and use it in GitHub Desktop.
Save hamiltont/cfd7201d196d0d232371 to your computer and use it in GitHub Desktop.
Count PRs proposed or merged since FrameworkBenchmarks Round 9
from github import Github
from datetime import datetime
import time
# Visit https://github.com/settings/applications
# and issue a new "personal access token"
g = Github("<your own github token>")
round9 = datetime.strptime('2014-03-19 13:07:11', '%Y-%m-%d %H:%M:%S')
pulls = g.get_repo('TechEmpower/FrameworkBenchmarks').get_pulls(state='all')
proposed=0
merged=0
for pull in pulls:
if pull.created_at >= round9:
print "Found PR : " + pull.title
print "State : " + pull.state
proposed += 1
if pull.merged:
merged += 1
time.sleep(0.5)
print "Proposed: " + str(proposed)
print "Merged : " + str(merged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment