feature: allow merges between environments

This commit is contained in:
jt
2026-05-20 17:00:20 -03:00
parent 23eb9df482
commit 5806aeab27
+16
View File
@@ -13,6 +13,22 @@ def merge():
ensure_initialized() ensure_initialized()
branch = ensure_right_branch() branch = ensure_right_branch()
environments = flowconfig["flow.branches"].split(",")
if branch in environments:
if branch == environments[-1]:
raise GitFlowError("No se puede hacer un merge del último entorno.")
panel(
"Merge de entornos",
"""Está por hacer un merge de 2 entornos que puede implicar muchos cambios en el proyecto.""",
)
if not confirm("¿Desea continuar?"):
raise GitFlowError("Ejecución abortada")
target = environments[environments.index(branch) + 1]
else:
target, _ = get_branch_env_and_type(branch) target, _ = get_branch_env_and_type(branch)
if "flow.remote" in flowconfig: if "flow.remote" in flowconfig: