From c02784ac5b8dee26ed2638a6bed08ca8caee41cc Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: May 01 2022 17:58:59 +0000 Subject: frontend: more understandable Pagure badges Put package name into the badge "title", so when multiple packages are built in one PR it is clear what badge belongs to what package. This is needed to recognize the latest badge for particular packages (others are usually obsoleted). --- diff --git a/frontend/coprs_frontend/coprs/logic/builds_logic.py b/frontend/coprs_frontend/coprs/logic/builds_logic.py index d6c2f1a..c784bba 100644 --- a/frontend/coprs_frontend/coprs/logic/builds_logic.py +++ b/frontend/coprs_frontend/coprs/logic/builds_logic.py @@ -1100,8 +1100,12 @@ class BuildsLogic(object): 'build', str(build.id) ) + username = "Copr build" + if build.package: + username += " - " + build.package.name + data = { - 'username': 'Copr build', + 'username': username, 'comment': '#{}'.format(build.id), 'url': build_url, 'status': state_table[build.state][0],