From b7b0f1e86cef6b9cbbb5861770ced447bbfa11a0 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 16 2020 07:54:10 +0000 Subject: Show the default branch in the project overview page Fixes https://pagure.io/pagure/issue/4715 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/static/pagure.css b/pagure/static/pagure.css index d57520b..837a9d3 100644 --- a/pagure/static/pagure.css +++ b/pagure/static/pagure.css @@ -501,6 +501,11 @@ th[data-sort] { background: #ddd; } +.commit_branch { + font-size: 1em; + background: #ababab; +} + .light_gray_bg { background-color:#ccc; } @@ -549,4 +554,4 @@ th[data-sort] { .api-doc .card-body h2.title { display: none; -} \ No newline at end of file +} diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index a5f74d3..dd5b54b 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -279,7 +279,8 @@ namespace=repo.namespace, commitid=commit.hex, branch=branchname) }}" class="notblue"> - {{ commit.hex|short }} + {{ branchname }}{{ commit.hex|short }} {{ commit.message.split('\n')[0] }} diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html index 9c3c96c..05afe2b 100644 --- a/pagure/themes/srcfpo/templates/repo_info.html +++ b/pagure/themes/srcfpo/templates/repo_info.html @@ -418,7 +418,8 @@ namespace=repo.namespace, commitid=commit.hex, branch=branchname) }}" class="notblue"> - {{ commit.hex|short }} + {{ branchname }}{{ commit.hex|short }} {{ commit.message.split('\n')[0] }} diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py index 6bbd066..cc2f8a4 100644 --- a/tests/test_pagure_flask_ui_app.py +++ b/tests/test_pagure_flask_ui_app.py @@ -2324,6 +2324,11 @@ class PagureFlaskAppNewProjecttests(tests.Modeltests): 'testproject', output_text, ) + self.assertIn( + 'master', + output_text, + ) # After projects = pagure.lib.query.search_projects(self.session) @@ -2492,6 +2497,11 @@ class PagureFlaskAppNewProjecttests(tests.Modeltests): 'project_main', output_text, ) + self.assertIn( + 'main', + output_text, + ) # After projects = pagure.lib.query.search_projects(self.session)