]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
patch.py: better handle color states
authorMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 27 May 2026 07:49:00 +0000 (07:49 +0000)
committerStephen Finucane <stephenfinucane@hotmail.com>
Sun, 7 Jun 2026 15:40:34 +0000 (16:40 +0100)
The current logic applies checks color only once. That's
weird and makes harder for people to properly idenfify
CI checks when there are multiple CI reports at the same line.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
patchwork/templatetags/patch.py

index d3f023f720eaf0f444b1fc50f961b4eea497a91f..c22dfa33617e796b7d325ad708a47184eae74bc6 100644 (file)
@@ -39,14 +39,9 @@ def patch_checks(patch):
     counts = patch.check_count
 
     check_elements = []
-    use_color = True
     for state in required[::-1]:
         if counts[state]:
-            if use_color:
-                use_color = False
-                color = dict(Check.STATE_CHOICES).get(state)
-            else:
-                color = ''
+            color = dict(Check.STATE_CHOICES).get(state)
             count = str(counts[state])
         else:
             color = ''