Skip to content

Instantly share code, notes, and snippets.

@yurinnick
Created January 20, 2016 19:22
Show Gist options
  • Save yurinnick/760cf636941e06c37471 to your computer and use it in GitHub Desktop.
Save yurinnick/760cf636941e06c37471 to your computer and use it in GitHub Desktop.
from github import Github
import json
org = 'place-org-name-here'
gh_token = 'place-gh-token-here'
g = Github(gh_token)
repo_list = g.get_organization(org).get_repos()
data = map(lambda repo: { 'repository': repo.name, 'last_update': str(repo.pushed_at) }, repo_list)
with open('output.json', 'w') as outfile:
json.dump(data, outfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment