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
评论列表
文章目录