feat: atomic extract-and-connect + stale PR monitor + response audit #4
1 changed files with 2 additions and 0 deletions
|
|
@ -388,6 +388,8 @@ def _prepare_branch(branch_name: str) -> bool:
|
|||
subprocess.run(["git", "fetch", "origin", "main"], cwd=cwd, check=True, capture_output=True)
|
||||
subprocess.run(["git", "checkout", "main"], cwd=cwd, check=True, capture_output=True)
|
||||
subprocess.run(["git", "reset", "--hard", "origin/main"], cwd=cwd, check=True, capture_output=True)
|
||||
# Delete branch if it already exists (from a failed previous run)
|
||||
subprocess.run(["git", "branch", "-D", branch_name], cwd=cwd, capture_output=True)
|
||||
subprocess.run(["git", "checkout", "-b", branch_name], cwd=cwd, check=True, capture_output=True)
|
||||
print(f"Branch created: {branch_name}")
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in a new issue