regexp_or_package.add_argument('--package', help="A specific package to check.") parser.add_argument('--local', help="Whether to use the existing local checkouts of the feedstocks, or to fetch from upstream", action="store_true", default=False) parser.add_argument('--limit', help="Limit the number of packages to propose changes for (0 is unlimited).", default=1, type=int) args = parser.parse_args() feedstocks_dir = os.path.expanduser(args.feedstocks_dir) change_limit = args.limit if args.package: package_name = args.package package_feedstock = '{}-feedstock'.format(package_name) args.regexp = package_name need_to_clone = args.local == False feedstock_gen = feedstocks.feedstocks_yaml('conda-forge', feedstocks_dir, use_local=args.local, randomise=True, pull_up_to_date=need_to_clone, regexp=args.regexp) gh_token = conda_smithy.github.gh_token() gh = github.Github(gh_token) gh_me = gh.get_user() if gh_me.login != 'conda-forge-admin': raise ValueError("The github token isn't that of conda-forge-admin (it's " "for {}), I'm going to have to bail.".format(gh_me.login)) gh_forge = gh.get_organization('conda-forge') def my_repos(gh_user): """
gh_me = gh.get_user() if gh_me.login != 'conda-forge-admin': raise ValueError("The github token isn't that of conda-forge-admin (it's " "for {}), I'm going to have to bail.".format(gh_me.login)) gh_forge = gh.get_organization('conda-forge') if args.package: package_name = args.package package_feedstock = '{}-feedstock'.format(package_name) args.regexp = package_name need_to_clone = args.local == False feedstock_gen = feedstocks.feedstocks_yaml('conda-forge', feedstocks_dir, use_local=args.local, randomise=True, pull_up_to_date=need_to_clone, regexp=args.regexp) def my_repos(gh_user): """ List all of my repos. See https://github.com/PyGithub/PyGithub/issues/390 for rationale. """ return github.PaginatedList.PaginatedList( github.Repository.Repository, gh_user._requester, gh_user.url + "/repos", dict(affiliation="owner"))