From 07aa8cb8c41acff38c217bb9691f1f88c280417a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 04 2017 09:52:29 +0000 Subject: [PATCH 1/7] Mention on what the rebase was done Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 85a6dc3..e107d37 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -1476,7 +1476,7 @@ def diff_pull_request( new_commits_count, commenttext) if request.commit_start and \ request.commit_start != first_commit.oid.hex: - commenttext = 'rebased' + commenttext = 'rebased onto %s' % first_commit.oid.hex request.commit_start = first_commit.oid.hex request.commit_stop = diff_commits[0].oid.hex session.add(request) From f9fd15bed0085addf80d2810f0192ab82428dec6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 04 2017 09:52:29 +0000 Subject: [PATCH 2/7] Add some more tests on the behavior of the Merge keyword in commits Signed-off-by: Pierre-Yves Chibon --- diff --git a/tests/test_pagure_lib_link.py b/tests/test_pagure_lib_link.py index 3cb0d37..6ad845e 100644 --- a/tests/test_pagure_lib_link.py +++ b/tests/test_pagure_lib_link.py @@ -267,6 +267,8 @@ class PagureLibLinktests(tests.Modeltests): issue_match('Fixed: #23', '23') issue_match('This commit fixes: #42', '42') issue_match('Merge #137', '137') + issue_match('Merges #137', '137') + issue_match('Merges: #137', '137') # no match def no_match(text): From a3651eaef1c56d876843ab72079975d5131c4f01 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 04 2017 09:52:29 +0000 Subject: [PATCH 3/7] Remove the line numbers coming from pygments on pull-requests Since we're adding there our own line numbers Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index a6f2891..d557964 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -489,7 +489,7 @@ {% else %} {% autoescape false %} - {{ patch | patch_to_diff | html_diff | format_loc( + {{ patch | patch_to_diff | html_diff(linenos=None) | format_loc( filename=patch_new_file_path, commit=patch_new_id, prequest=pull_request, diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py index ae39f67..95d6fac 100644 --- a/pagure/ui/filters.py +++ b/pagure/ui/filters.py @@ -397,7 +397,7 @@ def markdown_filter(text): @APP.template_filter('html_diff') -def html_diff(diff): +def html_diff(diff, linenos='inline'): """Display diff as HTML""" if diff is None: return @@ -411,7 +411,7 @@ def html_diff(diff): diff, difflexer, HtmlFormatter( - linenos='inline', + linenos=linenos, noclasses=True, style="diffstyle") ) From f22fd70b19e5d04c97d1b591a903cc200b995282 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 04 2017 09:52:29 +0000 Subject: [PATCH 4/7] Include the targeted branch in the list of PRs Fixes https://pagure.io/pagure/issue/2552 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/requests.html b/pagure/templates/requests.html index cd151f0..e91d952 100644 --- a/pagure/templates/requests.html +++ b/pagure/templates/requests.html @@ -89,6 +89,7 @@ Pull Request + To Opened Modified {% if status|lower not in ['open', 'true'] %} @@ -144,6 +145,9 @@ {% endif %} + {{ request.branch }} + + {{ request.date_created | humanize}} From 5e35881b7a909ab3927f545546c6f20622144263 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 04 2017 09:52:29 +0000 Subject: [PATCH 5/7] Separately link user/namespace/name The user link will send you to the user's page The namespace link will send you to all the projects in this namespace and the name link will send you to the overview page of the current project Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html index 26367e3..63bc9ec 100644 --- a/pagure/templates/repo_master.html +++ b/pagure/templates/repo_master.html @@ -22,23 +22,25 @@

- + {% endif %} + {% if repo.is_fork -%} + + {{ repo.user.user }}/ + {%- endif -%} + {%- if repo.namespace -%} + {{ repo.namespace }}/ + {%- endif -%} - {% if repo.private %} - - {% endif %} - {% if repo.is_fork -%} - - {{ repo.user.user }}/{{ - repo.namespace + '/' if repo.namespace - }}{{ repo.name}} - {%- else -%} - {{ repo.namespace + '/' if repo.namespace }}{{ repo.name }} - {%- endif -%} - + namespace=repo.namespace) + }}">{{ repo.name }} {% if authenticated %}
{% if repo.settings.get('issue_tracker', True) @@ -89,9 +91,9 @@ namespace=repo.namespace, )}}" class="btn btn-sm btn-primary">{{repo.stargazers|length}} {% endif %} -
+

-
+
{% if not repo.is_fork %} {% if g.repo_forked %}