Commit 74f1abc7 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

fix: don't apply the rules ProposeBaseConfig and AddNewRules on non beta cubes

parent f01dd1fedc87
Pipeline #110214 failed with stage
in 34 seconds
import os
import logging
from ruamel.yaml import YAML
from cube_doctor import Command
logger = logging.getLogger("cube_doctor")
class AddNewRules(Command):
command_name = "add-new-rules"
......@@ -14,6 +17,13 @@ class AddNewRules(Command):
return "continue"
def modify_code(self, cube, repo, root_files, branches, other_args):
if "cube-doctor-beta" not in cube.tag_list:
logger.debug(
f"cube '{cube.id} {cube.name}' doesn't have the tag 'cube-doctor-beta', "
"skip"
)
return
yaml = YAML(typ="safe")
yaml.default_flow_style = False
......
......@@ -44,6 +44,13 @@ class ProposeBaseConfig(Command):
# circular imports
from cube_doctor.utils import COMMANDS # noqa
if "cube-doctor-beta" not in cube.tag_list:
logger.debug(
f"cube '{cube.id} {cube.name}' doesn't have the tag 'cube-doctor-beta', "
"skip"
)
return
# we ignore unused cubes
if (
cube.namespace["full_path"] == "cubicweb/cubes"
......
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