From 64a548c40b602f5a791e727dc9cd43a7badf3dde Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 03 2019 12:13:11 +0000 Subject: [PATCH 1/4] Fix rendering badges on the PR list page Fixes https://pagure.io/pagure/issue/4597 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/_render_pullrequests.html b/pagure/templates/_render_pullrequests.html index 23d59ce..268f2ef 100644 --- a/pagure/templates/_render_pullrequests.html +++ b/pagure/templates/_render_pullrequests.html @@ -135,7 +135,7 @@ {% for tag in request.tags %} + class="badge badge-secondary font-90p"> {{ tag.tag }} {% endfor %} From 93032d13a0160ce5b2f4530faacaa494815ea1c3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 03 2019 12:13:11 +0000 Subject: [PATCH 2/4] Fix the docstring so it matches what the function is doing Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index 880fbd6..6f1ecce 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -229,7 +229,7 @@ def request_pulls(repo, username=None, namespace=None): "/fork////pull-request/" ) def request_pull(repo, requestid, username=None, namespace=None): - """ Create a pull request with the changes from the fork into the project. + """ View a pull request with the changes from the fork into the project. """ repo = flask.g.repo From 7d07b9b47f6d00d7b494c84250fb37a881011880 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 03 2019 12:17:45 +0000 Subject: [PATCH 3/4] Add some logging when cloning via http does not work and returns a 404 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/ui/clone.py b/pagure/ui/clone.py index 6839a18..93d8196 100644 --- a/pagure/ui/clone.py +++ b/pagure/ui/clone.py @@ -241,6 +241,13 @@ def clone_proxy(project, username=None, namespace=None): asuser=flask.request.remote_user, ) if not project: + _log.info( + "%s could not find project: %s for user %s and namespace %s", + flask.request.remote_user, + project, + username, + namespace, + ) flask.abort(404, description="Project not found") if project.is_on_repospanner: From c5ff01daacc7d86fdd0c255a974d5d10f5227627 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 03 2019 12:17:45 +0000 Subject: [PATCH 4/4] Tweak when we show the merge and the rebase buttons Only show the merge button when the user is a committer of the project against which the PR is opened. Show the rebase button when the user is allowed to rebase the PR or has commit to the project the PR originates from. Fixes https://pagure.io/pagure/issue/4596 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html index ae6a174..e012de2 100644 --- a/pagure/templates/repo_pull_request.html +++ b/pagure/templates/repo_pull_request.html @@ -182,24 +182,26 @@