Ruff
Some checks failed
Run Python tests (through Pytest) / Test (push) Successful in 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Has been cancelled

This commit is contained in:
Jon Michael Aanes 2025-04-14 23:51:34 +02:00
parent 7eab429f81
commit 3bdbf2e621
2 changed files with 8 additions and 8 deletions

View File

@ -138,6 +138,7 @@ For code tasks:
MODEL = None
def create_aider_command(issue: str) -> list[str]:
l = [
'aider',
@ -195,7 +196,7 @@ def get_commit_messages(cwd: Path, base_branch: str, current_branch: str) -> str
return result.stdout.strip()
except subprocess.CalledProcessError:
logger.exception(f'Failed to get commit messages on branch {current_branch}')
return ""
return ''
def push_changes(
@ -209,16 +210,16 @@ def push_changes(
if not has_commits_on_branch(cwd, base_branch, branch_name):
logger.info('No commits made on branch %s, skipping push', branch_name)
return False
# Get commit messages for PR description
commit_messages = get_commit_messages(cwd, base_branch, branch_name)
description = f"This pull request resolves #{issue_number}\n\n"
description = f'This pull request resolves #{issue_number}\n\n'
if commit_messages:
description += "## Commit Messages\n\n"
description += '## Commit Messages\n\n'
for message in commit_messages.split('\n'):
description += f"- {message}\n"
description += f'- {message}\n'
cmd = [
'git',
'push',

View File

@ -1,4 +1,3 @@
from aider_gitea.seen_issues_db import SeenIssuesDB