Compare commits
2 Commits
4e536e5859
...
b7899ace41
Author | SHA1 | Date | |
---|---|---|---|
b7899ace41 | |||
fd2c580d7f |
|
@ -159,6 +159,16 @@ For code tasks:
|
||||||
1. Create a plan for how to solve the issue.
|
1. Create a plan for how to solve the issue.
|
||||||
2. Write unit tests that proves that your solution works.
|
2. Write unit tests that proves that your solution works.
|
||||||
3. Then, solve the issue by writing the required code.
|
3. Then, solve the issue by writing the required code.
|
||||||
|
|
||||||
|
# Code Quality Pass
|
||||||
|
|
||||||
|
4. Perform a code quality pass to ensure all conventions from CONVENTIONS.md are followed and that ruff reports no issues. Improve code quality by adding early error validation, enforcing strict behavior, and avoiding code duplication.
|
||||||
|
|
||||||
|
Key focus areas:
|
||||||
|
- Dataclasses should be marked frozen.
|
||||||
|
- Re-use functions to avoid code duplication.
|
||||||
|
- Add early error validation.
|
||||||
|
- Enforce strict behavior.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MODEL = None
|
MODEL = None
|
||||||
|
@ -240,7 +250,9 @@ 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, repository_config.base_branch, branch_name,
|
cwd,
|
||||||
|
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'
|
||||||
|
|
||||||
|
@ -266,7 +278,9 @@ def push_changes(
|
||||||
|
|
||||||
# Extract PR number and URL if available
|
# Extract PR number and URL if available
|
||||||
return IssueResolution(
|
return IssueResolution(
|
||||||
True, str(pr_response.get('number')), pr_response.get('html_url'),
|
True,
|
||||||
|
str(pr_response.get('number')),
|
||||||
|
pr_response.get('html_url'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -388,7 +402,9 @@ def solve_issue_in_repository(
|
||||||
|
|
||||||
|
|
||||||
def solve_issues_in_repository(
|
def solve_issues_in_repository(
|
||||||
repository_config: RepositoryConfig, client, seen_issues_db,
|
repository_config: RepositoryConfig,
|
||||||
|
client,
|
||||||
|
seen_issues_db,
|
||||||
):
|
):
|
||||||
"""Process all open issues with the 'aider' label.
|
"""Process all open issues with the 'aider' label.
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,9 @@ 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.base_branch, self.current_branch,
|
self.cwd,
|
||||||
|
self.base_branch,
|
||||||
|
self.current_branch,
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch('aider_gitea.get_commit_messages')
|
@patch('aider_gitea.get_commit_messages')
|
||||||
|
@ -39,7 +41,9 @@ 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.base_branch, self.current_branch,
|
self.cwd,
|
||||||
|
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