Compare commits
No commits in common. "e3a39f98b8d1d2d406b48d86524b4fa119ccb26b" and "00490679195bc1d5eabae7e5430ff8efb80d69f8" have entirely different histories.
e3a39f98b8
...
0049067919
|
@ -227,9 +227,6 @@ def push_changes(
|
|||
for message in commit_messages:
|
||||
description += f'- {message}\n'
|
||||
|
||||
# Add trailing line documenting costs
|
||||
description += '\n## Costs\nThis task was solved using AI assistance.'
|
||||
|
||||
# First push the branch without creating a PR
|
||||
cmd = ['git', 'push', 'origin', branch_name, '--force']
|
||||
run_cmd(cmd, cwd)
|
||||
|
@ -286,10 +283,8 @@ def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> bool:
|
|||
result = subprocess.run(cmd, check=check, cwd=cwd)
|
||||
return result.returncode == 0
|
||||
|
||||
|
||||
SKIP_AIDER = False
|
||||
|
||||
|
||||
def solve_issue_in_repository(
|
||||
args,
|
||||
tmpdirname: Path,
|
||||
|
@ -299,7 +294,7 @@ def solve_issue_in_repository(
|
|||
issue_number: str,
|
||||
gitea_client=None,
|
||||
) -> bool:
|
||||
logger.info('### %s #####', issue_title)
|
||||
logger.info("### %s #####", issue_title)
|
||||
|
||||
repo_url = f'{args.gitea_url}:{args.owner}/{args.repo}.git'.replace(
|
||||
'https://',
|
||||
|
@ -336,7 +331,7 @@ def solve_issue_in_repository(
|
|||
check=False,
|
||||
)
|
||||
else:
|
||||
logger.warning('Skipping aider command (for testing)')
|
||||
logger.warning("Skipping aider command (for testing)")
|
||||
succeeded = True
|
||||
if not succeeded:
|
||||
logger.error('Aider invocation failed for issue #%s', issue_number)
|
||||
|
|
|
@ -24,11 +24,7 @@ class TestSolveIssueInRepository:
|
|||
@patch('aider_gitea.push_changes')
|
||||
@patch('subprocess.run')
|
||||
def test_solve_issue_with_aider_changes(
|
||||
self,
|
||||
mock_subprocess_run,
|
||||
mock_push_changes,
|
||||
mock_run_cmd,
|
||||
mock_llm_api_key,
|
||||
self, mock_subprocess_run, mock_push_changes, mock_run_cmd, mock_llm_api_key,
|
||||
):
|
||||
# Setup mocks
|
||||
mock_run_cmd.return_value = True
|
||||
|
@ -38,8 +34,7 @@ class TestSolveIssueInRepository:
|
|||
mock_subprocess_run.side_effect = [
|
||||
MagicMock(stdout='abc123\n', returncode=0), # First git rev-parse
|
||||
MagicMock(
|
||||
stdout='file1.py\nfile2.py\n',
|
||||
returncode=0,
|
||||
stdout='file1.py\nfile2.py\n', returncode=0,
|
||||
), # git diff with changes
|
||||
]
|
||||
|
||||
|
@ -64,11 +59,7 @@ class TestSolveIssueInRepository:
|
|||
@patch('aider_gitea.push_changes')
|
||||
@patch('subprocess.run')
|
||||
def test_solve_issue_without_aider_changes(
|
||||
self,
|
||||
mock_subprocess_run,
|
||||
mock_push_changes,
|
||||
mock_run_cmd,
|
||||
mock_llm_api_key,
|
||||
self, mock_subprocess_run, mock_push_changes, mock_run_cmd, mock_llm_api_key,
|
||||
):
|
||||
# Setup mocks
|
||||
mock_run_cmd.return_value = True
|
||||
|
|
Loading…
Reference in New Issue
Block a user