Provide a fallback description for labels without a description

This commit is contained in:
Pedro Algarvio 2024-04-10 10:42:27 +01:00
parent 2e16029108
commit 215b17bd22

View file

@ -968,7 +968,9 @@ def get_pr_test_labels(
if labels:
ctx.info(f"Test labels for pull-request #{pr} on {repository}:")
for name, description in sorted(labels):
ctx.info(f" * [yellow]{name}[/yellow]: {description}")
ctx.info(
f" * [yellow]{name}[/yellow]: {description or '[red][No description][/red]'}"
)
if name.startswith("test:os:"):
slug = name.split("test:os:", 1)[-1]
if slug not in available and name != "test:os:all":