Merged in feature/allow-environment-merges (pull request #71)
feature: allow merges between environments Approved-by: Jonathan Teran
This commit is contained in:
@@ -13,7 +13,23 @@ def merge():
|
||||
ensure_initialized()
|
||||
|
||||
branch = ensure_right_branch()
|
||||
target, _ = get_branch_env_and_type(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)
|
||||
|
||||
if "flow.remote" in flowconfig:
|
||||
remote = flowconfig["flow.remote"]
|
||||
|
||||
Reference in New Issue
Block a user