From 89bed7e6841bb0bba9a8dcc221060b8f772f59c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6ppner?= <jonas.hoeppner@garz-fricke.com> Date: Thu, 24 Mar 2022 16:38:22 +0100 Subject: [PATCH] CI: Add function to merge the gitlab-ci MRs --- common.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common.py b/common.py index 144c7f8d..2322972f 100755 --- a/common.py +++ b/common.py @@ -241,11 +241,17 @@ def get_repository_file_obj(project: Project, filename, ref=None): if ref is None: ref = project.default_branch logging.debug("Using default branch %s", ref) - repository_tree = project.repository_tree(ref=ref, retry_transient_errors=True) + + repository_tree = project.repository_tree( + ref=ref, all=True, retry_transient_errors=True + ) logging.debug(repository_tree) fileobj = [f for f in repository_tree if f["name"] == filename] if len(fileobj) == 0: + logging.error("Could not find file %s", filename) + for f in repository_tree: + logging.debug(f["name"]) return None fileobj = fileobj[0] return fileobj -- GitLab