From de8f62ec426add9289f66851767b042b2931ed76 Mon Sep 17 00:00:00 2001 From: Lenka Segura Date: May 07 2019 09:13:48 +0000 Subject: Adjust the repo_from in create_pull_request Pagure is now expecting three more arguments to specify from which project a pull request is opened with API: `repo_from`, `repo_from_username` and `repo_from_namespace`. Libpagure receives them as a dictionary and converts them into a string. --- diff --git a/libpagure/libpagure.py b/libpagure/libpagure.py index 8ff0e6a..cdc4f54 100644 --- a/libpagure/libpagure.py +++ b/libpagure/libpagure.py @@ -606,6 +606,12 @@ class Pagure(object): :param branch_from: the name of the branch containing the changes to merge :param initial_comment: the initial comment describing what these changes are about + :param repo_from: the name on the project the changes originate from, + received as a dictionary and posted as a string + :param repo_from_username: the username of the project the changes + originate from, received as a dictionary and posted as a string + :param repo_from_namespace: the namespace of the project the changes + originate from, received as a dictionary and posted as a string :return: """ request_url = "{}pull-request/new".format(self.create_basic_url()) @@ -613,6 +619,9 @@ class Pagure(object): "title": title, "branch_to": branch_to, "branch_from": branch_from, + "repo_from": self.repo_from["repo"], + "repo_from_username": self.repo_from["username"], + "repo_from_namespace": self.repo_from["namespace"] } if initial_comment is not None: payload["initial_comment"] = initial_comment