From 0c178766d4cc9bd8d8cc6a3bc4ee9fdfa527cb36 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon
Date: Jan 11 2018 08:55:45 +0000
Subject: Include documentation on how to pull locally a pull-request on the PR page
Fixes https://pagure.io/pagure/issue/2823
Signed-off-by: Pierre-Yves Chibon
---
diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html
index 163da79..2fc7bea 100644
--- a/pagure/templates/pull_request.html
+++ b/pagure/templates/pull_request.html
@@ -646,8 +646,15 @@
{% endif %}
+
+ {% if pull_request %}
+
+
Pull this pull-request locally v
+
git pull {{ config.get('GIT_URL_GIT') }}{{ repo.fullname }}.git refs/pull/{{ pull_request.id }}/head
+
+ {% endif %}
{% endif %}
@@ -1095,6 +1102,18 @@ $(document).ready(function() {
emoji_complete(json_url, folder);
+ $('#local_pull_info_btn').click(function(){
+ var _el = $('#local_pull_info');
+ if (! _el.is(':visible')){
+ _el.show();
+ $('#local_pull_info_btn').text('^');
+ } else {
+ _el.hide();
+ $('#local_pull_info_btn').text('v');
+ }
+ return false;
+ });
+
$('#cancel_pr').click(function(){
return window.confirm("Are you sure you want to close this requested pull?");
});