From d2af919fef42f6535eba96b5821623ed7299160c Mon Sep 17 00:00:00 2001 From: Lenka Segura Date: May 20 2019 08:15:46 +0000 Subject: changes regarding the repo_to --- diff --git a/cranc/cranc.py b/cranc/cranc.py index 9fa5437..c448dd8 100644 --- a/cranc/cranc.py +++ b/cranc/cranc.py @@ -47,12 +47,12 @@ def get(): @click.option("--author") def pr_list(status, assignee, author): """Prints list of pull requests. - :param status: filters the status of the requests + :param status: filters the status of the requests: Open, Closed, Merged :param assignee: filters the assignee of the requests :param author: filters the author of the requests :return: """ - PAGURE = libpagure.Pagure(pagure_token=api_token, pagure_repository=project) + PAGURE = libpagure.Pagure(pagure_token=api_token, repo_to=project) try: prs = PAGURE.list_requests(status=status, assignee=assignee, author=author) except Exception: @@ -89,7 +89,7 @@ def issue_list(status, tags, assignee, author, milestones, priority, no_stones, since=since, ) except exceptions.APIError: - pagure_noauth = libpagure.Pagure(pagure_repository=project) + pagure_noauth = libpagure.Pagure(repo_to=project) issues = pagure_noauth.list_issues( status=status, tags=tags, @@ -151,13 +151,13 @@ def create_pr(repo_to, title, branch_to, branch_from, repo_from): repo_to=repo_to["repo"], fork_username=repo_to["username"], namespace=repo_to["namespace"], - repo_from=utils.get_dict_from_str(repo_from), instance_url=instance_url, ) PAGURE.log_debug(True) try: request = PAGURE.create_pull_request( - title=title, branch_to=branch_to, branch_from=branch_from + title=title, branch_to=branch_to, branch_from=branch_from, + repo_from=utils.get_dict_from_str(repo_from) ) pprint.pprint(request) except Exception: