Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
897e9aa53b | ||
|
|
e4800d1054 | ||
|
|
0d95a978bf | ||
|
|
0af5102fae | ||
|
|
2a21922a63 | ||
|
|
12b2bc9a39 | ||
|
|
b24b22a178 | ||
|
|
c5f1be346c | ||
|
|
6c32b3e751 | ||
|
|
5600e5ec83 | ||
|
|
57142afa40 | ||
|
|
4375af35d9 | ||
|
|
44b8efd953 | ||
|
|
f4b47000a6 | ||
|
|
b12d2a1930 | ||
|
|
7b4fb34ef3 |
@@ -1,3 +1,39 @@
|
||||
## 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
|
||||
|
||||
- **bugfix**: listado de ramas para elegir grupo release no devolvia resultados [[jteran](mailto:jteran@renatre.org.ar)] (5600e5e)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.7.2 - 2025-12-11
|
||||
|
||||
- **bugfix**: al hacer un release, cambio a la rama grupo si esta disponible [[jteran](mailto:jteran@renatre.org.ar)] (44b8efd)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.7.1 - 2025-12-11
|
||||
|
||||
- **bugfix**: cambio la forma en la que se obtiene el first fork point entre 2 ramas [[jteran](mailto:jteran@renatre.org.ar)] (7b4fb34)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.7.0 - 2025-12-11
|
||||
|
||||
- **feature**: muestro el listado de commits a pasar al siguiente entorno en release [[jteran](mailto:jteran@renatre.org.ar)] (2e65cb7)
|
||||
|
||||
@@ -80,6 +80,10 @@ class MergeCommand(Command):
|
||||
|
||||
def create_pull_request(self, token: str, branch: str, target: str):
|
||||
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(
|
||||
branch,
|
||||
|
||||
@@ -56,12 +56,13 @@ class ReleaseCommand(Command):
|
||||
|
||||
group = args.group
|
||||
|
||||
if not group and self.confirm("¿Desea agrupar este release con otra rama?", False):
|
||||
group = self.choice("Grupo release: ", Git.get_branches("release/" + next_env + "/"))
|
||||
else:
|
||||
group = next_env
|
||||
if not group:
|
||||
if self.confirm("¿Desea agrupar este release con otra rama?", False):
|
||||
group = self.choice("Grupo release: ", Git.get_branches("release/" + next_env + "/"))
|
||||
else:
|
||||
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("pull").exec(print="Sincronizando cambios la rama objetivo")
|
||||
Git("switch", "-").exec(print="Volviendo a la rama original")
|
||||
|
||||
+13
-14
@@ -1,5 +1,6 @@
|
||||
import subprocess
|
||||
|
||||
from git_flow import GitFlowError
|
||||
from git_flow.io import *
|
||||
|
||||
|
||||
@@ -63,32 +64,30 @@ class Git:
|
||||
|
||||
@staticmethod
|
||||
def get_first_fork_point(branch: str, env: str):
|
||||
boundary_commits = list(
|
||||
filter(
|
||||
lambda c: c.startswith("-"), # boundary commits
|
||||
Git(
|
||||
"rev-list", env + "..." + branch, topo_order=True, boundary=True
|
||||
).lines(),
|
||||
)
|
||||
)
|
||||
# Lista de commits alcanzables por el entorno (por ejemplo, dev),
|
||||
env_commits = Git("rev-list", env + "..." + branch, first_parent=True).lines()
|
||||
|
||||
if not boundary_commits:
|
||||
if not env_commits:
|
||||
raise RuntimeError("No se encontro un commit base para realizar el rebase.")
|
||||
|
||||
return boundary_commits[-1].removeprefix("-")
|
||||
return Git("show", env_commits[-1] + "^", patch=False, format="%h").firstline()
|
||||
|
||||
@staticmethod
|
||||
def _get_references(kind: str):
|
||||
prefix = "refs/" + kind
|
||||
return list(map(
|
||||
lambda r: r.removeprefix(prefix),
|
||||
Git("for-each-ref", prefix + "*", format="%(refname)").lines(),
|
||||
))
|
||||
return Git("for-each-ref", prefix + "**", format="%(refname:short)").lines()
|
||||
|
||||
@staticmethod
|
||||
def is_repository() -> bool:
|
||||
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:
|
||||
self.command = ["git", subcommand]
|
||||
|
||||
|
||||
@@ -79,6 +79,9 @@ def main():
|
||||
command.error(str(e))
|
||||
except Exception as e:
|
||||
command.error("Ocurrió un error inesperado: " + str(e))
|
||||
except KeyboardInterrupt as e:
|
||||
print()
|
||||
command.error("Ejecución abortada")
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user