feature: add branch clean command #61

Merged
jt merged 3 commits from feature/add-branch-clean-command into main 2026-09-23 00:41:20 +00:00
3 changed files with 10 additions and 4 deletions
Showing only changes of commit 5ece118c05 - Show all commits
+2 -2
View File
@@ -69,7 +69,7 @@ más información):
- `merge`: Mergea la rama actual a una de las ramas principales.
- `tag`: Crea un tag sobre el ultimo merge siguiendo SemVer (ver [Tag](#tag)).
- `release`: Prepara la rama actual para pasarse al siguiente entorno configurado.
- `branch`: Lista las ramas del repositorio, agrupadas por entorno objetivo.
- `branch ls`: Lista las ramas del repositorio, agrupadas por entorno objetivo.
El workflow para el cual se penso la herramienta es el siguiente:
@@ -88,7 +88,7 @@ El workflow para el cual se penso la herramienta es el siguiente:
`feature/my-new-feature`, se crea la rama `release/test/feature/my-new-feature` sobre `test` que
tiene los cambios de la rama original.
En cualquier momento se puede usar `git-flow branch` para ver en qué entorno está cada rama, y cuáles
En cualquier momento se puede usar `git-flow branch ls` para ver en qué entorno está cada rama, y cuáles
están todavía en progreso (`wip/`) o descartadas (`trash/`).
### Tag
+6
View File
@@ -0,0 +1,6 @@
import typer
from git_flow.command.branch import ls
app = typer.Typer(name="branch")
app.add_typer(ls.app)
@@ -3,12 +3,12 @@ from typing import Annotated
import typer
from rich.console import Console
import git_flow.command.base as base
from git_flow import (
TRASH_BRANCH_PREFIX,
WIP_BRANCH_PREFIX,
GitFlowError,
)
from git_flow.command import base
from git_flow.git import Git
BRANCH_FORMAT = "%(refname:short)"
@@ -18,7 +18,7 @@ console = Console()
@app.command()
def branch(
def ls(
environment: Annotated[
str | None,
typer.Argument(