Compare commits
No commits in common. "4e536e585940089850e2850a3e5a6f55d1f4b772" and "d196155bf7b5c9883a7cb8878f084c762759dc0b" have entirely different histories.
4e536e5859
...
d196155bf7
|
@ -240,9 +240,7 @@ def push_changes(
|
||||||
|
|
||||||
# Get commit messages for PR description
|
# Get commit messages for PR description
|
||||||
commit_messages = get_commit_messages(
|
commit_messages = get_commit_messages(
|
||||||
cwd,
|
cwd, repository_config.base_branch, branch_name,
|
||||||
repository_config.base_branch,
|
|
||||||
branch_name,
|
|
||||||
)
|
)
|
||||||
description = f'This pull request resolves #{issue_number}\n\n'
|
description = f'This pull request resolves #{issue_number}\n\n'
|
||||||
|
|
||||||
|
@ -268,9 +266,7 @@ def push_changes(
|
||||||
|
|
||||||
# Extract PR number and URL if available
|
# Extract PR number and URL if available
|
||||||
return IssueResolution(
|
return IssueResolution(
|
||||||
True,
|
True, str(pr_response.get('number')), pr_response.get('html_url'),
|
||||||
str(pr_response.get('number')),
|
|
||||||
pr_response.get('html_url'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -380,14 +376,6 @@ def solve_issue_in_repository(
|
||||||
)
|
)
|
||||||
return IssueResolution(False)
|
return IssueResolution(False)
|
||||||
|
|
||||||
# Code quality pass: ensure ruff passes
|
|
||||||
if not run_cmd(['bash', '-c', 'ruff check .'], tmpdirname, check=False):
|
|
||||||
logger.info('Code quality issues detected, invoking aider to fix lint...')
|
|
||||||
run_cmd(create_aider_command(issue_content), tmpdirname, check=False)
|
|
||||||
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False)
|
|
||||||
run_cmd(['git', 'add', '.'], tmpdirname)
|
|
||||||
run_cmd(['git', 'commit', '-m', 'Aider lint fixes'], tmpdirname, check=False)
|
|
||||||
|
|
||||||
# Push changes
|
# Push changes
|
||||||
return push_changes(
|
return push_changes(
|
||||||
repository_config,
|
repository_config,
|
||||||
|
@ -400,9 +388,7 @@ def solve_issue_in_repository(
|
||||||
|
|
||||||
|
|
||||||
def solve_issues_in_repository(
|
def solve_issues_in_repository(
|
||||||
repository_config: RepositoryConfig,
|
repository_config: RepositoryConfig, client, seen_issues_db,
|
||||||
client,
|
|
||||||
seen_issues_db,
|
|
||||||
):
|
):
|
||||||
"""Process all open issues with the 'aider' label.
|
"""Process all open issues with the 'aider' label.
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,7 @@ class TestHasCommitsOnBranch:
|
||||||
|
|
||||||
# Verify get_commit_messages was called with correct arguments
|
# Verify get_commit_messages was called with correct arguments
|
||||||
mock_get_commit_messages.assert_called_once_with(
|
mock_get_commit_messages.assert_called_once_with(
|
||||||
self.cwd,
|
self.cwd, self.base_branch, self.current_branch,
|
||||||
self.base_branch,
|
|
||||||
self.current_branch,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch('aider_gitea.get_commit_messages')
|
@patch('aider_gitea.get_commit_messages')
|
||||||
|
@ -41,9 +39,7 @@ class TestHasCommitsOnBranch:
|
||||||
|
|
||||||
# Verify get_commit_messages was called with correct arguments
|
# Verify get_commit_messages was called with correct arguments
|
||||||
mock_get_commit_messages.assert_called_once_with(
|
mock_get_commit_messages.assert_called_once_with(
|
||||||
self.cwd,
|
self.cwd, self.base_branch, self.current_branch,
|
||||||
self.base_branch,
|
|
||||||
self.current_branch,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch('aider_gitea.get_commit_messages')
|
@patch('aider_gitea.get_commit_messages')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user