#4576 Fix creating PRs from the API when cross-projects token
Merged by pingou. Opened by pingou.
fix_cross_project_token  into  master

Download 4576.patch
no initial comment

It would be sensible to allow updating the pull request with the same token, it does not have too much sense to be able to open it but not correct a typo on it =)

https://pagure.io/pagure/blob/f74d37c3e52b948319b854283cad67bdf3ae6366/f/pagure/api/fork.py#_480

diff --git a/pagure/api/fork.py b/pagure/api/fork.py
index fb2a4a7a..282aa8dc 100644
--- a/pagure/api/fork.py
+++ b/pagure/api/fork.py
@@ -477,7 +477,7 @@ def api_pull_request_update(repo, requestid, username=None, namespace=None):
     repo = _get_repo(repo, username, namespace)
     _check_pull_request(repo)
-    _check_token(repo)
+    _check_token(repo, project_token=False)
     request = _get_request(repo, requestid)
     _check_pull_request_access(request, assignee=True)

:thumbsup:

1 new commit added

  • Allow updating PRs via the API using cross-project tokens

:thumbsup:

Let's wait for jenkins and get this in :)

:thumbsup:

Pull-Request has been merged by pingou

Metadata