Skip to content

Commit

Permalink
Allow user to clone repositories for an organization
Browse files Browse the repository at this point in the history
  • Loading branch information
gdb committed Jun 17, 2011
1 parent 26cb508 commit 00716a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ghsync/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 00716a5

Please sign in to comment.