Skip to content
Browse files

Allow user to clone repositories for an organization

  • Loading branch information...
1 parent 26cb508 commit 00716a526d797f12f7abe7bcba36c0a198f2d6b6 @gdb gdb committed
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 00716a5

Please sign in to comment.
Something went wrong with that request. Please try again.