mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-16 10:40:16 +08:00
Fix extract PrReviewTitle member value
This commit is contained in:
@ -90,9 +90,9 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool = True, increment
|
||||
}
|
||||
markdown_text = ""
|
||||
if not incremental_review:
|
||||
markdown_text += f"{PrReviewTitle.REGULAR} 🔍\n\n"
|
||||
markdown_text += f"{PrReviewTitle.REGULAR.value} 🔍\n\n"
|
||||
else:
|
||||
markdown_text += f"{PrReviewTitle.INCREMENTAL} 🔍\n\n"
|
||||
markdown_text += f"{PrReviewTitle.INCREMENTAL.value} 🔍\n\n"
|
||||
markdown_text += f"⏮️ Review for commits since previous PR-Agent review {incremental_review}.\n\n"
|
||||
if gfm_supported:
|
||||
markdown_text += "<table>\n"
|
||||
|
@ -96,9 +96,9 @@ class GithubProvider(GitProvider):
|
||||
self.comments = list(self.pr.get_issue_comments())
|
||||
prefixes = []
|
||||
if full:
|
||||
prefixes.append({PrReviewTitle.REGULAR})
|
||||
prefixes.append({PrReviewTitle.REGULAR.value})
|
||||
if incremental:
|
||||
prefixes.append({PrReviewTitle.INCREMENTAL})
|
||||
prefixes.append({PrReviewTitle.INCREMENTAL.value})
|
||||
for index in range(len(self.comments) - 1, -1, -1):
|
||||
if any(self.comments[index].body.startswith(prefix) for prefix in prefixes):
|
||||
return self.comments[index]
|
||||
|
@ -134,7 +134,7 @@ class PRReviewer:
|
||||
if get_settings().pr_reviewer.persistent_comment and not self.incremental.is_incremental:
|
||||
final_update_message = get_settings().pr_reviewer.final_update_message
|
||||
self.git_provider.publish_persistent_comment(pr_review,
|
||||
initial_header=f"{PrReviewTitle.REGULAR} 🔍",
|
||||
initial_header=f"{PrReviewTitle.REGULAR.value} 🔍",
|
||||
update_header=True,
|
||||
final_update_message=final_update_message, )
|
||||
else:
|
||||
|
Reference in New Issue
Block a user