#33 changes regarding the repo_to
Merged 4 years ago by lenkaseg. Opened 4 years ago by lenkaseg.

file modified
+5 -5
@@ -47,12 +47,12 @@ 

  @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 @@ 

              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 @@ 

          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:

Renamed the pagure_repository to repo_to.
Corrected a detail in docstring.

Pull-Request has been merged by lenkaseg

4 years ago
Metadata