From 3c8b0959ad97900dacc12eaa3cb290e1f4b51311 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 12 2017 11:12:42 +0000 Subject: Create the reference directly when the PR is created Instead of waiting for the first view of the PR, just create the reference when creating the PR. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 0014a6d..f9d5b3e 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1565,6 +1565,14 @@ def new_pull_request(session, branch_from, 'pr': request.to_json(public=True, with_comments=False) })) + # Create the ref from the start + tasks.sync_pull_ref.delay( + request.project.name, + request.project.namespace, + request.project.user.username if request.project.is_fork else None, + request.id + ) + return request