Created
August 7, 2013 01:51
-
-
Save apetresc/6170539 to your computer and use it in GitHub Desktop.
Script to grab all commits from an organization since a certain time
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 characters
| from github import Github | |
| import datetime | |
| USER = 'ENTER_USER_HERE' | |
| PASS = 'ENTER_PASS_HERE' | |
| ORG_NAME = 'ENTER_ORG_NAME_HERE' | |
| SINCE = datetime.datetime(2012, 8, 1) | |
| g = Github(USER, PASS) | |
| org = [org for org in g.get_user().get_orgs() if org.name == ORG_NAME][0] | |
| for repo in org.get_repos(): | |
| for commit in repo.get_commits(since=since): | |
| print ('"%s","%s","%s","%s"' % (repo.name, commit.commit.author.date, commit.commit.author.name, commit.commit.message.replace('"', '\\"'))).encode('utf-8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment