Skip to content
Snippets Groups Projects
Commit 80d63e0e authored by Jonas Höppner's avatar Jonas Höppner
Browse files

CI: Add function to merge the gitlab-ci MRs

parent b9cb9a29
No related branches found
No related tags found
No related merge requests found
Pipeline #9046 failed with stages
in 35 seconds
......@@ -241,11 +241,15 @@ 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]
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment