chore: delete local feature branch before checking it out
Deploy bin / deploy (push) Successful in 4s
Deploy service MASTER / deploy (push) Failing after 2s

This commit is contained in:
Benjamin Labrecque
2026-07-06 12:22:03 +02:00
parent 29759f3c97
commit f51e3ba296
+8
View File
@@ -38,6 +38,14 @@ def git_push_changes(
logger.info(f"Git Operation Failed: {e}")
def delete_local_branch(repo: git.Repo, branch_name: str):
"""
Delete local branch if it already exists
"""
logger.info(f"Deleting local branch '{branch_name}'...")
repo.git.branch("-D", branch_name)
def switch_branch(repo: git.Repo, branch_name: str):
"""
Create branch if it doesn't exist, then checkout