mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
bitbucket finally works
This commit is contained in:
@ -155,18 +155,17 @@ class BitbucketProvider(GitProvider):
|
|||||||
|
|
||||||
|
|
||||||
def publish_persistent_review(self, pr_comment: str):
|
def publish_persistent_review(self, pr_comment: str):
|
||||||
## not working yet, need to find a way to update the comment
|
try:
|
||||||
# try:
|
for comment in self.pr.comments():
|
||||||
# for comment in self.pr.comments():
|
body = comment.raw
|
||||||
# body = comment.raw
|
if '## PR Analysis' in body:
|
||||||
# if '## PR Analysis' in body:
|
pr_comment_updated = pr_comment.replace('## PR Analysis\n', '## PR Analysis (updated)\n')
|
||||||
# pr_comment_updated = pr_comment.replace('## PR Analysis\n', '## PR Analysis (updated)\n')
|
d = {"content": {"raw": pr_comment_updated}}
|
||||||
# comment.data['content']['raw']= pr_comment_updated
|
response = comment._update_data(comment.put(None, data=d))
|
||||||
# comment.update()
|
return
|
||||||
# return
|
except Exception as e:
|
||||||
# except Exception as e:
|
get_logger().exception(f"Failed to update persistent review, error: {e}")
|
||||||
# get_logger().exception(f"Failed to update persistent review, error: {e}")
|
pass
|
||||||
# pass
|
|
||||||
self.publish_comment(pr_comment)
|
self.publish_comment(pr_comment)
|
||||||
|
|
||||||
def publish_comment(self, pr_comment: str, is_temporary: bool = False):
|
def publish_comment(self, pr_comment: str, is_temporary: bool = False):
|
||||||
|
Reference in New Issue
Block a user