From 2e65cb7a3e391a071f40c4c9d4ade147ae54f137 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Date: Thu, 11 Dec 2025 09:53:41 -0300 Subject: [PATCH] feature: muestro el listado de commits a pasar al siguiente entorno en release --- src/git_flow/command/release.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/git_flow/command/release.py b/src/git_flow/command/release.py index 2605441..8a9a1d2 100644 --- a/src/git_flow/command/release.py +++ b/src/git_flow/command/release.py @@ -43,6 +43,17 @@ class ReleaseCommand(Command): else f"release/{next_env}/{branch}" ) + base = Git.get_first_fork_point(branch, env) + commits = Git("log", base + ".." , format="%s").lines() + + if not commits: + raise GitFlowError("No hay cambios a mergear.") + + print("Cambios a pasar al proximo entorno:") + + for commit in commits: + print("- " + commit) + group = args.group if not group and self.confirm("¿Desea agrupar este release con otra rama?", False): @@ -55,11 +66,8 @@ class ReleaseCommand(Command): Git("pull").exec(print="Sincronizando cambios la rama objetivo") Git("switch", "-").exec(print="Volviendo a la rama original") - base = Git.get_first_fork_point(branch, env) - commits = int(Git("rev-list", base + "..", count=True).firstline()) - - if commits > 1 and self.confirm( - f"¿Desea reemplazar los {commits} commits de la rama por uno solo?", + if len(commits) > 1 and self.confirm( + f"¿Desea reemplazar los {len(commits)} commits de la rama por uno solo?", False ): self.info("Debe ingresar el mensaje del commit a crear.")