From 10af87bc198eee5841facd5298465f42a788b84f Mon Sep 17 00:00:00 2001
From: gyulaid <gyulaid@gyulai.cloud>
Date: Thu, 31 Mar 2022 23:25:51 +0200
Subject: [PATCH] output hotfix

---
 alice-ci/src/alice/utils.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/alice-ci/src/alice/utils.py b/alice-ci/src/alice/utils.py
index 914093c..af1e1c0 100644
--- a/alice-ci/src/alice/utils.py
+++ b/alice-ci/src/alice/utils.py
@@ -54,7 +54,6 @@ class ConfigParser:
             paths = []
             for path in changes["paths"]:
                 paths.append(os.path.abspath(path))
-            print(paths)
             # TODO: Error handling
             command = ["git", "diff", "--name-only", target]
             with subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p:
@@ -64,8 +63,9 @@ class ConfigParser:
                     for path in paths:
                         spec_path = os.path.abspath(path)
                         if change_path.startswith(spec_path):
-                            print(f"Modified file: {change_path}")
-                            print(f"Path match: {path}")
+                            if self.verbose:
+                                print(f"[Alice] Modified file: {change_path}")
+                                print(f"[Alice] Path match: {path}")
                             return True
         except KeyError:
             raise ConfigException(f"Invalid 'changes' config: {changes}")
@@ -82,5 +82,5 @@ class ConfigParser:
                 runner.run(job_spec)
                 return "SUCCESS"
             else:
-                print("SKIP, no change detected")
+                return "SKIP, no change detected"
 
-- 
GitLab