Ruff after aider
This commit is contained in:
parent
f253235841
commit
e56463d207
|
@ -539,6 +539,7 @@ def solve_issues_in_repository(
|
||||||
issue_number,
|
issue_number,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def handle_pr_comments(
|
def handle_pr_comments(
|
||||||
repository_config,
|
repository_config,
|
||||||
pr_number,
|
pr_number,
|
||||||
|
@ -567,15 +568,15 @@ def handle_pr_comments(
|
||||||
context = ''
|
context = ''
|
||||||
body = comment.get('body', '')
|
body = comment.get('body', '')
|
||||||
issue = (
|
issue = (
|
||||||
f"Resolve the following reviewer comment:\n{body}\n\n"
|
f'Resolve the following reviewer comment:\n{body}\n\n'
|
||||||
f"File: {path}\n\nContext:\n{context}"
|
f'File: {path}\n\nContext:\n{context}'
|
||||||
)
|
)
|
||||||
# invoke aider on the comment context
|
# invoke aider on the comment context
|
||||||
issue_solution_round(repository_path, issue)
|
issue_solution_round(repository_path, issue)
|
||||||
# commit and push changes for this comment
|
# commit and push changes for this comment
|
||||||
run_cmd(['git', 'add', path], repository_path, check=False)
|
run_cmd(['git', 'add', path], repository_path, check=False)
|
||||||
run_cmd(
|
run_cmd(
|
||||||
['git', 'commit', '-m', f"Resolve comment {comment.get('id')}"],
|
['git', 'commit', '-m', f'Resolve comment {comment.get("id")}'],
|
||||||
repository_path,
|
repository_path,
|
||||||
check=False,
|
check=False,
|
||||||
)
|
)
|
||||||
|
|
|
@ -170,7 +170,10 @@ class GiteaClient:
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
def get_pull_request_comments(
|
def get_pull_request_comments(
|
||||||
self, owner: str, repo: str, pr_number: str,
|
self,
|
||||||
|
owner: str,
|
||||||
|
repo: str,
|
||||||
|
pr_number: str,
|
||||||
) -> list[dict]:
|
) -> list[dict]:
|
||||||
"""
|
"""
|
||||||
Fetch comments for a pull request.
|
Fetch comments for a pull request.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user