[libvirt-ci PATCH 4/4] check-dco: Support namespaces other than libvirt

Andrea Bolognani abologna at redhat.com
Thu Apr 30 19:28:12 UTC 2020


This will allow us to reuse the same container image to perform
DCO checking for libosinfo repositories.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 containers/check-dco/check-dco.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/containers/check-dco/check-dco.py b/containers/check-dco/check-dco.py
index 79cfadc..339fb57 100755
--- a/containers/check-dco/check-dco.py
+++ b/containers/check-dco/check-dco.py
@@ -23,9 +23,13 @@ import os.path
 import sys
 import subprocess
 
+namespace = "libvirt"
+if len(sys.argv) >= 2:
+    namespace = sys.argv[1]
+
 cwd = os.getcwd()
 reponame = os.path.basename(cwd)
-repourl = "https://gitlab.com/libvirt/%s.git" % reponame
+repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame)
 
 subprocess.check_call(["git", "remote", "add", "check-dco", repourl])
 subprocess.check_call(["git", "fetch", "check-dco", "master"],
-- 
2.25.4




More information about the libvir-list mailing list