Autolint
This commit is contained in:
parent
f12e750194
commit
8c75a10b3a
|
@ -49,9 +49,6 @@ AIDER_LINT=bash_cmd(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
#MODEL = 'o3-mini'
|
|
||||||
#MODEL = 'claude-3-7-sonnet'
|
|
||||||
|
|
||||||
LLM_MESSAGE_FORMAT = """
|
LLM_MESSAGE_FORMAT = """
|
||||||
{issue}
|
{issue}
|
||||||
|
|
||||||
|
@ -67,12 +64,11 @@ For code tasks:
|
||||||
def create_aider_command(issue: str) -> list[str]:
|
def create_aider_command(issue: str) -> list[str]:
|
||||||
return [
|
return [
|
||||||
'aider',
|
'aider',
|
||||||
#'--model', MODEL,
|
|
||||||
'--chat-language', 'english',
|
'--chat-language', 'english',
|
||||||
'--test-cmd', AIDER_TEST,
|
'--test-cmd', AIDER_TEST,
|
||||||
'--lint-cmd', AIDER_LINT,
|
'--lint-cmd', AIDER_LINT,
|
||||||
'--auto-test',
|
'--auto-test',
|
||||||
'--no-auto-lint',
|
'--auto-lint',
|
||||||
'--api-key', secrets.llm_api_key(),
|
'--api-key', secrets.llm_api_key(),
|
||||||
'--read', 'CONVENTIONS.md',
|
'--read', 'CONVENTIONS.md',
|
||||||
'--message', LLM_MESSAGE_FORMAT.format(issue=issue),
|
'--message', LLM_MESSAGE_FORMAT.format(issue=issue),
|
||||||
|
@ -175,7 +171,7 @@ def process_issue(args, tmpdirname: Path, branch_name: str, issue_title: str, is
|
||||||
run_cmd(["git", "checkout", "-b", branch_name], tmpdirname)
|
run_cmd(["git", "checkout", "-b", branch_name], tmpdirname)
|
||||||
run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname)
|
run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname)
|
||||||
run_cmd(["git", "add", "."], tmpdirname)
|
run_cmd(["git", "add", "."], tmpdirname)
|
||||||
|
|
||||||
# Check if there are any commits on the branch before pushing
|
# Check if there are any commits on the branch before pushing
|
||||||
if has_commits_on_branch(tmpdirname, args.base_branch, branch_name):
|
if has_commits_on_branch(tmpdirname, args.base_branch, branch_name):
|
||||||
push_changes(tmpdirname, branch_name, issue_number, issue_title, issue_description, args.base_branch)
|
push_changes(tmpdirname, branch_name, issue_number, issue_title, issue_description, args.base_branch)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user