From fd73ff73d7e4b6d678473a65662189a0f9e557e5 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jun 26 2018 11:48:21 +0000 Subject: add last commit to the repo info page This adds a box on the repo overview page that shows the details of the last commit to the main branch. Relates to #3338 Signed-off-by: Ryan Lerch --- diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index 95531d0..44a755a 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -251,6 +251,25 @@ + {% if last_commits %} + {% set commit = last_commits[0] %} +
+
+ + {{ commit.hex|short }} + {{ commit.message.split('\n')[0] }} + +
+
+ {{ commit.author | author2avatar(20) | safe }} {{commit.author.name}} committed {{ commit.commit_time|humanize }} +
+
+ {% endif %} {% if g.repo_obj and g.repo_obj.is_empty %} @@ -288,45 +307,6 @@ git push -u origin master {% endif %} {% endif %} - {#
- {% if last_commits %} - - {% endif %} -
#} {% endblock %}