Commit 7d3610bd authored by Laurent Peuch's avatar Laurent Peuch
Browse files

feat: only run new auto-mr on projects subscribed to beta

parent 1a719b19af80
......@@ -432,6 +432,7 @@ class Command:
commit_message=None,
update_mr=False,
delay=None,
beta=False,
other_args=None,
):
forced_branch_name = branch_name
......@@ -463,6 +464,19 @@ class Command:
if number is not None and cube_number_x >= number:
return
if beta and "cube-doctor-beta" not in cube.tag_list:
logger.debug(
f"project '{cube.id} {cube.name}' not subscribed to beta but command is "
"launched in beta mod, skip"
)
continue
elif not beta and "cube-doctor-beta" in cube.tag_list:
logger.debug(
f"project '{cube.id} {cube.name}' subscribed to beta but command is not "
"launched in beta mod, skip"
)
continue
try:
root_files = {
x["name"]
......
......@@ -48,6 +48,13 @@ def auto_mr(delay):
g.parse("./logigraphe.trig", format="trig")
for project in get_all_projects_am_member_of(""):
if "cube-doctor-beta" not in project.tag_list:
logger.debug(
f"project '{project.id} {project.name}' doesn't have the tag 'cube-doctor-beta', "
"skip"
)
continue
config = parse_config(project)
if config is None:
......@@ -91,6 +98,7 @@ def auto_mr(delay):
interactif=False,
merge_when_pipeline_succeeds=merge_when_pipeline_succeeds,
delay=delay,
beta=True,
other_args=arguments,
)
except Exception:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment