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(