This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you authorize your access token to be used with SAML | |
# https://help.github.com/articles/authorizing-a-personal-access-token-for-use-with-a-saml-single-sign-on-organization/ | |
# | |
# Run: | |
# python list_all_repos.py <org> | |
import github3 | |
import os | |
GITHUB_ACCESS_TOKEN = os.environ["GITHUB_ACCESS_TOKEN"] | |
gh = github3.login(token=GITHUB_ACCESS_TOKEN) | |
org = gh.organization(os.argv[1]) | |
repos = list(org.iter_repos(type="all")) | |
for r in repos: | |
print(r) |