diff mbox series

[yocto-autobuilder-helper,2/3] scripts/send-qa-email: define tests results repository url only once

Message ID 20231004092506.25365-3-alexis.lothore@bootlin.com
State New
Headers show
Series Make sure to pick tested rev as reference for regression report | expand

Commit Message

Alexis Lothoré Oct. 4, 2023, 9:25 a.m. UTC
From: Alexis Lothoré <alexis.lothore@bootlin.com>

Test results repository url is used at least twice, so define a constant
holding the url instead of hardcoding it multiple times

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
 scripts/send_qa_email.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index f9a982ae9143..ac8b4716f07b 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -15,6 +15,7 @@  import logging
 
 import utils
 
+TEST_RESULTS_REPOSITORY_URL="git@push.yoctoproject.org:yocto-testresults"
 exitcode = 0
 
 def is_release_version(version):
@@ -146,10 +147,10 @@  def send_qa_email():
             elif targetbranch:
                 cloneopts = ["--branch", targetbranch]
             try:
-                subprocess.check_call(["git", "clone", "git@push.yoctoproject.org:yocto-testresults", tempdir, "--depth", "1"] + cloneopts)
+                subprocess.check_call(["git", "clone", TEST_RESULTS_REPOSITORY_URL, tempdir, "--depth", "1"] + cloneopts)
             except subprocess.CalledProcessError:
                 log.info("No comparision branch found, falling back to master")
-                subprocess.check_call(["git", "clone", "git@push.yoctoproject.org:yocto-testresults", tempdir, "--depth", "1"])
+                subprocess.check_call(["git", "clone", TEST_RESULTS_REPOSITORY_URL, tempdir, "--depth", "1"])
 
             # If the base comparision branch isn't present regression comparision won't work
             # at least until we can tell the tool to ignore internal branch information