mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
match pr-pro
This commit is contained in:
@ -381,6 +381,9 @@ class GithubProvider(GitProvider):
|
|||||||
get_logger().error(f"Failed to publish code suggestion, error: {e}")
|
get_logger().error(f"Failed to publish code suggestion, error: {e}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def edit_comment(self, comment, body: str):
|
||||||
|
comment.edit(body=body)
|
||||||
|
|
||||||
def remove_initial_comment(self):
|
def remove_initial_comment(self):
|
||||||
try:
|
try:
|
||||||
for comment in getattr(self.pr, 'comments_list', []):
|
for comment in getattr(self.pr, 'comments_list', []):
|
||||||
@ -395,9 +398,6 @@ class GithubProvider(GitProvider):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
get_logger().exception(f"Failed to remove comment, error: {e}")
|
get_logger().exception(f"Failed to remove comment, error: {e}")
|
||||||
|
|
||||||
def edit_comment(self, comment, body: str):
|
|
||||||
comment.edit(body=body)
|
|
||||||
|
|
||||||
def get_title(self):
|
def get_title(self):
|
||||||
return self.pr.title
|
return self.pr.title
|
||||||
|
|
||||||
|
@ -179,11 +179,7 @@ class GitLabProvider(GitProvider):
|
|||||||
return comment
|
return comment
|
||||||
|
|
||||||
def edit_comment(self, comment, body: str):
|
def edit_comment(self, comment, body: str):
|
||||||
try:
|
self.mr.notes.update(comment.id,{'body': body} )
|
||||||
comment.body = body
|
|
||||||
comment.save()
|
|
||||||
except Exception as e:
|
|
||||||
get_logger().exception(f"Failed to edit comment, error: {e}")
|
|
||||||
|
|
||||||
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
||||||
edit_type, found, source_line_no, target_file, target_line_no = self.search_line(relevant_file,
|
edit_type, found, source_line_no, target_file, target_line_no = self.search_line(relevant_file,
|
||||||
|
Reference in New Issue
Block a user