organisation.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:dupin 作者: guardian 项目源码 文件源码
def update_organisation_repos(organisation, token, filename, excludes, include_forks):
    """Searches a Github organisation for repositories that can be
    cloned, writes discovered repo URLs to a local file."""
    github_client = Github(token)
    org = github_client.get_organization(organisation)

    printerr("Looking up {org} repositories (may take some time)".format(org=organisation))

    repos = org.get_repos("public")
    if not include_forks:
        repos = (repo for repo in repos if not repo.fork)
    clone_urls = _clone_urls(repos)
    filtered = filter_excluded_repos(clone_urls, excludes)
    with open(filename, "w") as f:
        _write_repo_list(filtered, f)
        printerr("Wrote list of repositories to {location}".format(location=filename))
    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号