mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
Rename & Return comment object after published
This commit is contained in:
@ -232,26 +232,28 @@ class GiteaProvider(GitProvider):
|
||||
return None
|
||||
|
||||
comment = self.limit_output_characters(comment, self.max_comment_chars)
|
||||
reponse = self.repo_api.create_comment(
|
||||
response = self.repo_api.create_comment(
|
||||
owner=self.owner,
|
||||
repo=self.repo,
|
||||
index=index,
|
||||
comment=comment
|
||||
)
|
||||
|
||||
if not reponse:
|
||||
if not response:
|
||||
self.logger.error("Failed to publish comment")
|
||||
return None
|
||||
|
||||
if is_temporary:
|
||||
self.temp_comments.append(comment)
|
||||
|
||||
self.comments_list.append({
|
||||
comment_obj = {
|
||||
"is_temporary": is_temporary,
|
||||
"comment": comment,
|
||||
"comment_id": reponse.id if isinstance(reponse, tuple) else reponse.id
|
||||
})
|
||||
"comment_id": response.id if isinstance(response, tuple) else response.id
|
||||
}
|
||||
self.comments_list.append(comment_obj)
|
||||
self.logger.info("Comment published")
|
||||
return comment_obj
|
||||
|
||||
def edit_comment(self, comment, body : str):
|
||||
body = self.limit_output_characters(body, self.max_comment_chars)
|
||||
|
Reference in New Issue
Block a user