Update
This commit is contained in:
parent
b4206ff41d
commit
897aedf9f5
|
@ -211,9 +211,10 @@ def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> b
|
|||
return False
|
||||
|
||||
|
||||
def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> None:
|
||||
print(cmd)
|
||||
subprocess.run(cmd, check=check, cwd=cwd)
|
||||
def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> bool:
|
||||
"""Returns true if the command succeeded."""
|
||||
result = subprocess.run(cmd, check=check, cwd=cwd)
|
||||
return result.returncode == 0
|
||||
|
||||
|
||||
def solve_issue_in_repository(
|
||||
|
@ -236,7 +237,10 @@ def solve_issue_in_repository(
|
|||
run_cmd(['git', 'checkout', '-b', branch_name], tmpdirname)
|
||||
|
||||
# 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
|
||||
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False)
|
||||
|
|
Loading…
Reference in New Issue
Block a user