Compare commits

...
7 Commits
5 changed files with 31 additions and 1 deletions
+15
View File
@@ -1,3 +1,18 @@
## v1.7.5 - 2025-12-14
- **bugfix**: verificar si la rama grupo trackea una rama remota antes de hacer pull [[jteran](mailto:jteran@renatre.org.ar)] (0d95a97)
- **bugfix**: capturo interrupion por teclado para no mostrar stack trace [[jteran](mailto:jteran@renatre.org.ar)] (0af5102)
---
## v1.7.4 - 2025-12-14
- **bugfix**: generación de PR de ramas release [[jteran](mailto:jteran@renatre.org.ar)] (b24b22a)
---
## v1.7.3 - 2025-12-14 ## v1.7.3 - 2025-12-14
- **bugfix**: listado de ramas para elegir grupo release no devolvia resultados [[jteran](mailto:jteran@renatre.org.ar)] (5600e5e) - **bugfix**: listado de ramas para elegir grupo release no devolvia resultados [[jteran](mailto:jteran@renatre.org.ar)] (5600e5e)
+4
View File
@@ -80,6 +80,10 @@ class MergeCommand(Command):
def create_pull_request(self, token: str, branch: str, target: str): def create_pull_request(self, token: str, branch: str, target: str):
changelog = Changelog() changelog = Changelog()
title = branch.replace("/", ": ").replace("-", " ")
if title.startswith("release: "):
title = title[title.index(' ', title.index(' ') + 1) + 1:]
message = self.get_remote_api(token).create_pull_request( message = self.get_remote_api(token).create_pull_request(
branch, branch,
+1 -1
View File
@@ -62,7 +62,7 @@ class ReleaseCommand(Command):
else: else:
group = next_env group = next_env
if has_remote: if has_remote and Git.get_tracking_branch(group):
Git("switch", group).exec(print="Cambiando a la rama objetivo") Git("switch", group).exec(print="Cambiando a la rama objetivo")
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")
+8
View File
@@ -1,5 +1,6 @@
import subprocess import subprocess
from git_flow import GitFlowError
from git_flow.io import * from git_flow.io import *
@@ -80,6 +81,13 @@ class Git:
def is_repository() -> bool: def is_repository() -> bool:
return Git("rev-parse", is_inside_work_tree=True).code() == 0 return Git("rev-parse", is_inside_work_tree=True).code() == 0
@staticmethod
def get_tracking_branch(branch: str) -> str | None:
try:
return Git("rev-parse", branch + "@{upstream}", abbrev_ref=True).firstline()
except subprocess.CalledProcessError:
return None
def __init__(self, subcommand: str, *args: str, **kwargs: str | int | bool | list[str] | None) -> None: def __init__(self, subcommand: str, *args: str, **kwargs: str | int | bool | list[str] | None) -> None:
self.command = ["git", subcommand] self.command = ["git", subcommand]
+3
View File
@@ -79,6 +79,9 @@ def main():
command.error(str(e)) command.error(str(e))
except Exception as e: except Exception as e:
command.error("Ocurrió un error inesperado: " + str(e)) command.error("Ocurrió un error inesperado: " + str(e))
except KeyboardInterrupt as e:
print()
command.error("Ejecución abortada")
return return