From 28bf00653b2cc63a49a6e8189b148138c5446178 Mon Sep 17 00:00:00 2001
From: Tim Jaacks <tim.jaacks@garz-fricke.com>
Date: Tue, 30 Aug 2022 18:12:19 +0200
Subject: [PATCH] retrigger: add job states to log message

---
 scripts/retrigger_integrating_projects.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/retrigger_integrating_projects.py b/scripts/retrigger_integrating_projects.py
index 45f64efa..4ca7d24c 100755
--- a/scripts/retrigger_integrating_projects.py
+++ b/scripts/retrigger_integrating_projects.py
@@ -84,17 +84,18 @@ def main():
                 retry_transient_errors=True,
             )
             try:
+                states = ["success", "running"]
                 jobs = retrigger_pipeline_jobs(
                     project,
                     pipeline,
                     args.job,
-                    ["success", "running"],
+                    states,
                     include_children=True,
                 )
                 if not jobs:
                     print(
-                        "Could not find any jobs named '%s' in %s"
-                        % (args.job, pipeline.web_url)
+                        "Could not find any jobs named '%s' with states %s in %s"
+                        % (args.job, states, pipeline.web_url)
                     )
             except GitlabJobRetryError as e:
                 print(
-- 
GitLab