Merged in feature/show-commit-list-on-release (pull request #45)
feature: show commit list on release Approved-by: Jonathan Teran
This commit is contained in:
@@ -43,6 +43,17 @@ class ReleaseCommand(Command):
|
|||||||
else f"release/{next_env}/{branch}"
|
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
|
group = args.group
|
||||||
|
|
||||||
if not group and self.confirm("¿Desea agrupar este release con otra rama?", False):
|
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("pull").exec(print="Sincronizando cambios la rama objetivo")
|
||||||
Git("switch", "-").exec(print="Volviendo a la rama original")
|
Git("switch", "-").exec(print="Volviendo a la rama original")
|
||||||
|
|
||||||
base = Git.get_first_fork_point(branch, env)
|
if len(commits) > 1 and self.confirm(
|
||||||
commits = int(Git("rev-list", base + "..", count=True).firstline())
|
f"¿Desea reemplazar los {len(commits)} commits de la rama por uno solo?",
|
||||||
|
|
||||||
if commits > 1 and self.confirm(
|
|
||||||
f"¿Desea reemplazar los {commits} commits de la rama por uno solo?",
|
|
||||||
False
|
False
|
||||||
):
|
):
|
||||||
self.info("Debe ingresar el mensaje del commit a crear.")
|
self.info("Debe ingresar el mensaje del commit a crear.")
|
||||||
|
|||||||
Reference in New Issue
Block a user