Update
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 25s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s

This commit is contained in:
Jon Michael Aanes 2025-04-13 18:24:41 +02:00
parent b4206ff41d
commit 897aedf9f5

View File

@ -211,9 +211,10 @@ def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> b
return False return False
def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> None: def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> bool:
print(cmd) """Returns true if the command succeeded."""
subprocess.run(cmd, check=check, cwd=cwd) result = subprocess.run(cmd, check=check, cwd=cwd)
return result.returncode == 0
def solve_issue_in_repository( def solve_issue_in_repository(
@ -236,7 +237,10 @@ def solve_issue_in_repository(
run_cmd(['git', 'checkout', '-b', branch_name], tmpdirname) run_cmd(['git', 'checkout', '-b', branch_name], tmpdirname)
# Run aider # Run aider
run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname) succeeded = run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname, check=False)
if not succeeded:
logger.error('Aider invocation failed for issue #%s', issue_number)
return False
# Auto-fix standard code quality stuff # Auto-fix standard code quality stuff
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False) run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False)