Implement edit comment

This commit is contained in:
Hussam.lawen
2024-02-11 12:31:30 +02:00
parent a40643bbba
commit 73d2b1565d
4 changed files with 21 additions and 0 deletions

View File

@ -176,6 +176,14 @@ class GitLabProvider(GitProvider):
comment = self.mr.notes.create({'body': mr_comment})
if is_temporary:
self.temp_comments.append(comment)
return comment
def edit_comment(self, comment, body: str):
try:
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):
edit_type, found, source_line_no, target_file, target_line_no = self.search_line(relevant_file,