Browse files

Merge pull request #5 from gdb/master

Add support for cloning repositories from a Github organization
  • Loading branch information...
2 parents 26cb508 + 00716a5 commit ab222a47b187c3240f29f3cea5fa20b88cdfd8fb @kennethreitz committed Dec 24, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 ghsync/core.py
View
6 ghsync/core.py
@@ -50,6 +50,7 @@ def run():
# cli flags
upstream_on = args.flags.contains('--upstream')
only_type = args.grouped.get('--only', False)
+ organization = args[0]
os.chdir(GHSYNC_DIR)
@@ -60,14 +61,15 @@ def run():
# repo slots
repos = {}
- repos['watched'] = [r for r in github.repos.watching(GITHUB_USER)]
+ if not organization:
+ repos['watched'] = [r for r in github.repos.watching(GITHUB_USER)]
repos['private'] = []
repos['mirrors'] = []
repos['public'] = []
repos['forks'] = []
# Collect GitHub repos via API
- for repo in github.repos.list():
+ for repo in github.repos.list(organization):
if repo.private:
repos['private'].append(repo)

0 comments on commit ab222a4

Please sign in to comment.