From 0b0251837439d7939e6dde3ca0fdec1a4aebe856 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 14 May 2025 09:36:12 +0200 Subject: [PATCH] found out that some couldn't checkout due to conflicts, but if you force it, it works --- pull_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pull_requests.py b/pull_requests.py index 238f7e9..af9b5fa 100644 --- a/pull_requests.py +++ b/pull_requests.py @@ -122,7 +122,7 @@ def checkout(repo_path: str, sha: str, pr_number: int) -> None: raise CantEnsureFullHistoryError(e.stderr) try: - run_git_cmd(["checkout", sha], repo_path) + run_git_cmd(["checkout", "-f", sha], repo_path) except subprocess.CalledProcessError: try: run_git_cmd(["fetch", "origin", f"pull/{pr_number}/merge"], repo_path) @@ -130,7 +130,7 @@ def checkout(repo_path: str, sha: str, pr_number: int) -> None: raise CantFetchPRError(e.stderr) try: - run_git_cmd(["checkout", sha], repo_path) + run_git_cmd(["checkout", "-f", sha], repo_path) except subprocess.CalledProcessError as e: raise CantCheckoutCommitError(e.stderr)