diff --git a/github/list_repos.py b/github/list_repos.py new file mode 100644 index 0000000..76351e8 --- /dev/null +++ b/github/list_repos.py @@ -0,0 +1,20 @@ +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) diff --git a/github/requirements.txt b/github/requirements.txt new file mode 100644 index 0000000..ba82e82 --- /dev/null +++ b/github/requirements.txt @@ -0,0 +1 @@ +pygithub3