Logging lines must not use f-strings. #65
|
@ -221,7 +221,7 @@ def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> b
|
|||
)
|
||||
return bool(result.stdout.strip())
|
||||
except subprocess.CalledProcessError:
|
||||
logger.exception(f'Failed to check commits on branch {current_branch}')
|
||||
logger.exception('Failed to check commits on branch %s', current_branch)
|
||||
return False
|
||||
|
||||
|
||||
|
@ -260,8 +260,9 @@ def solve_issue_in_repository(
|
|||
run_cmd(['git', 'checkout', '-b', branch_name], tmpdirname)
|
||||
|
||||
# Run aider
|
||||
issue_content = f'# {issue_title}\n{issue_description}'
|
||||
succeeded = run_cmd(
|
||||
create_aider_command(f'# {issue_title}\n{issue_description}'),
|
||||
create_aider_command(issue_content),
|
||||
tmpdirname,
|
||||
check=False,
|
||||
)
|
||||
|
@ -308,7 +309,7 @@ def handle_issues(args, client, seen_issues_db):
|
|||
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}')
|
||||
logger.info('Skipping already processed issue #%s: %s', issue_number, title)
|
||||
continue
|
||||
|
||||
branch_name = generate_branch_name(issue_number, title)
|
||||
|
|
|
@ -73,7 +73,7 @@ class GiteaClient:
|
|||
json_data = {'ref': f'refs/heads/{new_branch}', 'sha': sha}
|
||||
response = self.session.post(url, json=json_data)
|
||||
if response.status_code == 422:
|
||||
logger.warning(f'Branch {new_branch} already exists.')
|
||||
logger.warning('Branch %s already exists.', new_branch)
|
||||
return False
|
||||
response.raise_for_status()
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue
Block a user