Logging lines must not use f-strings. #52
|
@ -64,7 +64,6 @@ solve_issue_in_repository(
|
|||
The tool uses environment variables for sensitive information:
|
||||
- `GITEA_TOKEN`: Your Gitea API token
|
||||
- `LLM_API_KEY`: API key for the language model used by Aider
|
||||
```
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
@ -105,8 +104,6 @@ AIDER_TEST = bash_cmd(
|
|||
RUFF_FORMAT_AND_AUTO_FIX = bash_cmd(
|
||||
'ruff format',
|
||||
'ruff check --fix --ignore RUF022 --ignore PGH004',
|
||||
'ruff format',
|
||||
'ruff check --fix --ignore RUF022 --ignore PGH004',
|
||||
)
|
||||
|
||||
AIDER_LINT = bash_cmd(
|
||||
|
@ -115,7 +112,6 @@ AIDER_LINT = bash_cmd(
|
|||
'ruff check --ignore RUF022 --ignore PGH004',
|
||||
)
|
||||
|
||||
|
||||
LLM_MESSAGE_FORMAT = """
|
||||
{issue}
|
||||
|
||||
|
@ -247,39 +243,3 @@ def solve_issue_in_repository(
|
|||
issue_title,
|
||||
args.base_branch,
|
||||
)
|
||||
|
||||
|
||||
def handle_issues(args, client, seen_issues_db):
|
||||
"""Process all open issues with the 'aider' label."""
|
||||
try:
|
||||
issues = client.get_issues(args.owner, args.repo)
|
||||
except Exception:
|
||||
logger.exception('Failed to retrieve issues')
|
||||
sys.exit(1)
|
||||
|
||||
if not issues:
|
||||
logger.info('No issues found for %s', args.repo)
|
||||
return
|
||||
|
||||
for issue in issues:
|
||||
issue_number = issue.get('number')
|
||||
issue_description = issue.get('body', '')
|
||||
title = issue.get('title', f'Issue {issue_number}')
|
||||
issue_text = f'{title}\n{issue_description}'
|
||||
if seen_issues_db.has_seen(issue_text):
|
||||
logger.info(f'Skipping already processed issue #{issue_number}: {title}')
|
||||
continue
|
||||
|
||||
branch_name = generate_branch_name(issue_number, title)
|
||||
with tempfile.TemporaryDirectory() as tmpdirname:
|
||||
solved = solve_issue_in_repository(
|
||||
args,
|
||||
Path(tmpdirname),
|
||||
branch_name,
|
||||
title,
|
||||
issue_description,
|
||||
issue_number,
|
||||
)
|
||||
|
||||
if solved:
|
||||
seen_issues_db.mark_as_seen(issue_text)
|
||||
|
|
Loading…
Reference in New Issue
Block a user