feature: agrego soporte para especificar tickets en nombre e rama

This commit is contained in:
jt
2026-05-19 23:29:22 -03:00
parent 5a7ed03801
commit f389118515
3 changed files with 54 additions and 16 deletions
+12
View File
@@ -113,3 +113,15 @@ def get_remote_api(token: str) -> RemoteAPI:
return GithubRemoteAPI(repository, token)
else:
raise GitFlowError("El host del repositorio remoto es inválido")
def is_valid_ticket(ticket: str) -> bool:
"""Check if the specified string is a valid ticket number (ABC-123)"""
components = ticket.split("-")
if len(components) != 2:
return False
ticket_project = components[0]
ticket_number = components[1]
return ticket_project.isalpha() and ticket_project.isupper() and ticket_number.isnumeric()