Skip to content

Commit dbffab9

Browse files
mchehabstephenfin
authored andcommitted
patch.py: better handle color states
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>
1 parent 52877f8 commit dbffab9

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

patchwork/templatetags/patch.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,9 @@ def patch_checks(patch):
3939
counts = patch.check_count
4040

4141
check_elements = []
42-
use_color = True
4342
for state in required[::-1]:
4443
if counts[state]:
45-
if use_color:
46-
use_color = False
47-
color = dict(Check.STATE_CHOICES).get(state)
48-
else:
49-
color = ''
44+
color = dict(Check.STATE_CHOICES).get(state)
5045
count = str(counts[state])
5146
else:
5247
color = ''

0 commit comments

Comments
 (0)