Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create subgroup 'create'
- @click.group()
- def create():
- pass
- @click.command(name="pr")
- @click.option("--repo")
- @click.option("--title")
- @click.option("--branch_to")
- @click.option("--branch_from")
- def create_pr(repo, title, branch_to, branch_from):
- """this command creates a new pull request"""
- try:
- request = PAGURE.create_pull_request(repo=repo, title=title, branch_to=branch_to,
- branch_from=branch_from)
- pprint.pprint(request)
- except Exception:
- _log.exception("Failed to connect to the server")
- # Adding create_pr into the group 'create'
- create.add_command(create_pr)
Advertisement
Add Comment
Please, Sign In to add comment