From eb7783cc1f575533de2a5fa215325a7b89d5953a Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 4 Apr 2024 14:58:00 +0200 Subject: [PATCH] Add labels all at once --- snapshot_manager/snapshot_manager/snapshot_manager.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/snapshot_manager/snapshot_manager/snapshot_manager.py b/snapshot_manager/snapshot_manager/snapshot_manager.py index a1c99e46..43168766 100755 --- a/snapshot_manager/snapshot_manager/snapshot_manager.py +++ b/snapshot_manager/snapshot_manager/snapshot_manager.py @@ -111,18 +111,16 @@ def check_todays_builds(self): issue.remove_from_labels(label=label) # Labels must be added or removed manually in order to not remove manually added labels :/ - for label in ( + labels_to_add = ( error_labels + project_labels + os_labels + arch_labels + strategy_labels + other_labels - ): - logging.info(f"Adding label: {label}") - issue.add_to_labels(label) - - labels_on_issue = [label.name for label in issue.labels] + ) + logging.info(f"Adding label: {labels_to_add}") + issue.add_to_labels(labels_to_add) failed_test_cases: list[tf.FailedTestCase] = []