infra-utils/github/list_repos.py
Jakub Sokołowski f532b7c815
add script for listing repos of github org
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-01-17 10:56:32 +01:00

21 lines
458 B
Python

import pygithub3
gh = None
def gather_clone_urls(organization, no_forks=True):
all_repos = gh.repos.list(user=organization).all()
for repo in all_repos:
# Don't print the urls for repos that are forks.
if no_forks and repo.fork:
continue
yield repo.clone_url
if __name__ == '__main__':
gh = pygithub3.Github()
clone_urls = gather_clone_urls("status-im")
for url in clone_urls:
print(url)