From 3c458496d04e053ef468bcead52837a53670a244 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 23 Sep 2024 06:02:03 +0000 Subject: [PATCH] p Signed-off-by: kevin --- scripts/pipeline_generator/step.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/pipeline_generator/step.py b/scripts/pipeline_generator/step.py index c29c8b9..1e1c462 100644 --- a/scripts/pipeline_generator/step.py +++ b/scripts/pipeline_generator/step.py @@ -3,20 +3,20 @@ from .utils import AgentQueue +BUILD_STEP_KEY = "build" class BuildkiteBlockStep(BaseModel): """This class represents a block step in Buildkite format.""" block: str - depends_on: Optional[str] = "build" + depends_on: Optional[str] = BUILD_STEP_KEY key: str def get_step_key(step_label: str) -> str: - step_label = step_label.replace(", ", ",") step_key = "" - skip_chars = "()%" + skip_chars = "()% " for char in step_label.lower(): - if char in ", ": + if char in ", " and step_key[-1] != "-": step_key += "-" elif char not in skip_chars: step_key += char