feature: agrego comando release, elimino codigo no utilizado
This commit is contained in:
@@ -27,7 +27,7 @@ class MergeCommand(Command):
|
||||
self.run_local(base, branch, target)
|
||||
|
||||
def run_remote(self, remote: str, token: str, base: str, branch: str, target: str):
|
||||
self.check_pending_changes(True)
|
||||
self.ensure_clean_worktree(True)
|
||||
|
||||
Git("switch", target).exec(print="Cambiando a rama destino")
|
||||
Git("pull").exec(print="Obteniendo ultimos cambios del remoto")
|
||||
@@ -44,7 +44,7 @@ class MergeCommand(Command):
|
||||
self.create_pull_request(token, base, branch, target)
|
||||
|
||||
def run_local(self, base: str, branch: str, target: str):
|
||||
self.check_pending_changes(False)
|
||||
self.ensure_clean_worktree(False)
|
||||
self.check_merge_conflicts(target)
|
||||
self.show_commits_to_merge(base)
|
||||
|
||||
@@ -52,23 +52,6 @@ class MergeCommand(Command):
|
||||
Git("switch", target).exec(print="Cambiando a rama destino")
|
||||
Git("merge", branch, ff=False).exec(print="Mergeando")
|
||||
|
||||
def check_pending_changes(self, has_remote: bool):
|
||||
status = Git.status()
|
||||
|
||||
if not status:
|
||||
return
|
||||
|
||||
not_empty = any(map(lambda s: s.index != " " or s.worktree != " ", status))
|
||||
|
||||
if not_empty:
|
||||
if not has_remote:
|
||||
self.warning("Existen cambios en tu entorno de trabajo sin commitear.")
|
||||
else:
|
||||
raise GitFlowError("No se puede continuar con cambios pendientes.")
|
||||
|
||||
if not self.confirm("¿Desea continuar?", False):
|
||||
raise GitFlowError("Ejecución abortada")
|
||||
|
||||
def show_commits_to_merge(self, base):
|
||||
commits = Git("log", base + "..", format="%s").lines()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user