mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-13 11:25:18 +00:00
add try-except
This commit is contained in:
parent
33f859b073
commit
f1004273ec
1 changed files with 7 additions and 3 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
from collections import namedtuple
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
|
|
@ -47,9 +48,12 @@ class GithubProvider:
|
|||
self.pr.comments_list.append(response)
|
||||
|
||||
def remove_initial_comment(self):
|
||||
for comment in self.pr.comments_list:
|
||||
if comment.is_temporary:
|
||||
comment.delete()
|
||||
try:
|
||||
for comment in self.pr.comments_list:
|
||||
if comment.is_temporary:
|
||||
comment.delete()
|
||||
except Exception as e:
|
||||
logging.exception(f"Failed to remove initial comment, error: {e}")
|
||||
|
||||
def get_title(self):
|
||||
return self.pr.title
|
||||
|
|
|
|||
Loading…
Reference in a new issue