def run_remove_system(name, token, org, system, prompt):
"""
Removes a system from the repo.
"""
repo = get_repo(token=token, org=org, name=name)
try:
label = repo.get_label(name=system.strip())
label.delete()
click.secho("Successfully deleted {}".format(system), fg="green")
if prompt and click.confirm("Run update to re-generate the page?"):
run_update(name=name, token=token, org=org)
except UnknownObjectException:
click.secho("Unable to remove system {}, it does not exist.".format(system), fg="yellow")
评论列表
文章目录