From 4f9276d5ea117306ecad35f6238d91a57dd3e1ce Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 21 2016 08:44:09 +0000 Subject: [PATCH 1/3] reworked the recent commits box on the front page of a repo --- diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index 7c11c98..5e01739 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -289,7 +289,7 @@ git push -u origin master {% if repo_obj and not repo_obj.is_empty %}
- Recent Commits + Recent Commits in {{branchname}}
From 8a8fd3edb287d1e1eb31579c809274508c18c168 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 21 2016 08:51:38 +0000 Subject: [PATCH 2/3] Check if there are last_commits instead of checking the repo_obj --- diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index 5e01739..91c174e 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -101,7 +101,7 @@ git push -u origin master
- {%endif%} + {% endif %}
{% for commit in last_commits %} @@ -286,7 +286,7 @@ git push -u origin master
- {% if repo_obj and not repo_obj.is_empty %} + {% if last_commits %}
Recent Commits in {{branchname}} From ce2f5ba1a4031e0ac45cb13a2c869e7b6cad770a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 21 2016 08:51:54 +0000 Subject: [PATCH 3/3] Only show the last 3 commits on the side bar --- diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index 576e84c..0b10a49 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -177,7 +177,7 @@ def view_repo_branch(repo, branchname, username=None): for commit in repo_obj.walk(branch.get_object().hex, pygit2.GIT_SORT_TIME): last_commits.append(commit) cnt += 1 - if cnt == 10: + if cnt == 3: break diff_commits = []