github.py 文件源码

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

项目:metainvenio 作者: inveniosoftware 项目源码 文件源码
def github_repo_configure(ctx, with_maintainers_file=False):
    """Configure GitHub repositories."""
    conf = ctx.obj['config']
    gh = ctx.obj['client']

    for repo in conf.repositories:
        click.echo('Configuring {}'.format(repo.slug))
        repoapi = RepositoryAPI(gh, conf=repo)
        if repoapi.update_settings():
            click.echo('Updated settings')
        if repoapi.update_team():
            click.echo('Updated maintainer team')
        if repoapi.update_branch_protection():
            click.echo('Updated branch protection')
        if with_maintainers_file:
            click.echo('Checking MAINTAINERS file')
            if repoapi.update_maintainers_file():
                click.echo('Updated MAINTAINERS file')
        # TODO prevent merge commits
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号