instead of checking out the current branch

(main/master), i reset it hard (preshoting the jacoco injection)
This commit is contained in:
Karma Riuk
2025-03-18 11:49:11 +01:00
parent dfbc6f5afa
commit ade00bdf53

View File

@ -72,7 +72,7 @@ def ensure_full_history(repo_path: str) -> None:
def reset_repo_to_latest_commit(repo_path: str) -> None: def reset_repo_to_latest_commit(repo_path: str) -> None:
current_branch = run_git_cmd(["rev-parse", "--abbrev-ref", "HEAD"], repo_path).stdout.strip() current_branch = run_git_cmd(["rev-parse", "--abbrev-ref", "HEAD"], repo_path).stdout.strip()
run_git_cmd(["checkout", current_branch], repo_path) run_git_cmd(["reset", "--hard", current_branch], repo_path)
def process_pull(repo: Repository, pr: PullRequest, dataset: Dataset, repos_dir: str): def process_pull(repo: Repository, pr: PullRequest, dataset: Dataset, repos_dir: str):
commits = list(pr.get_commits()) commits = list(pr.get_commits())