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