From 7121d40ed800a1ecafd537dc2e1f0bed68ea4546 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Mon, 21 Sep 2026 14:35:27 -0300 Subject: [PATCH] bugfix: get target from tag options --- src/git_flow/command/tag.py | 4 ++-- src/git_flow/remote/gitlab.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git_flow/command/tag.py b/src/git_flow/command/tag.py index e494318..ee88bbf 100644 --- a/src/git_flow/command/tag.py +++ b/src/git_flow/command/tag.py @@ -16,11 +16,11 @@ app = typer.Typer() @app.command() -def tag(token: str | None = None, update_changelog: bool = False): +def tag(target: str | None = None, token: str | None = None, update_changelog: bool = False): """Crea un nuevo tag para el último merge.""" base.ensure_initialized() - target = Git.get_current_branch() + target = target or Git.get_current_branch() if target not in base.environments: raise GitFlowError("Solo se pueden taggear commits en ramas principales.") diff --git a/src/git_flow/remote/gitlab.py b/src/git_flow/remote/gitlab.py index 98e05d2..16259a3 100644 --- a/src/git_flow/remote/gitlab.py +++ b/src/git_flow/remote/gitlab.py @@ -46,7 +46,7 @@ class GitlabRemoteAPI(RemoteAPI): if response.ok: return "Tag creado exitosamente: " + tag else: - raise GitFlowError("Ocurrió un error al crear el tag para repositorio " + quote(self.repository, safe="") + ": " + response.text) + raise GitFlowError("Ocurrió un error al crear el tag: " + response.text) def get_merge_commits(self, merge_commit: str) -> list[Commit]: mrs = self.get_json(