feature: listar ramas de todos los entornos con flag --all, y del entorno actual por defecto

This commit is contained in:
Jonathan Teran Carballo
2025-12-14 22:00:14 -03:00
parent 774cf9ade6
commit 104b3214d4
+10 -1
View File
@@ -33,6 +33,12 @@ class BranchCommand(Command):
help=f"Listar ramas 'en progreso' (ramas que empiezan con '{WIP_BRANCH_PREFIX}')" help=f"Listar ramas 'en progreso' (ramas que empiezan con '{WIP_BRANCH_PREFIX}')"
) )
parser.add_argument(
"--all",
action="store_true",
help=f"Listar ramas de todos los entornos"
)
return parser return parser
def run(self, args: Namespace = Namespace()): def run(self, args: Namespace = Namespace()):
@@ -45,9 +51,12 @@ class BranchCommand(Command):
self.show_branches(TRASH_BRANCH_PREFIX) self.show_branches(TRASH_BRANCH_PREFIX)
elif args.wip: elif args.wip:
self.show_branches(WIP_BRANCH_PREFIX) self.show_branches(WIP_BRANCH_PREFIX)
elif args.environment is None: elif args.all:
self.show_envs() self.show_envs()
self.show_all_branches() self.show_all_branches()
elif args.environment is None:
self.show_envs()
self.show_env_branches(self.current_branch)
elif args.environment in self.environments: elif args.environment in self.environments:
self.show_envs() self.show_envs()
self.show_env_branches(args.environment) self.show_env_branches(args.environment)