Update PR review prompts and terminology for clarity and consistency (#954)

* Update PR review prompts and terminology for clarity and consistency
This commit is contained in:
Tal
2024-06-10 08:44:11 +03:00
committed by GitHub
parent f1d5587220
commit aac7aeabd1
9 changed files with 57 additions and 36 deletions

View File

@ -92,9 +92,9 @@ class GithubProvider(GitProvider):
self.comments = list(self.pr.get_issue_comments())
prefixes = []
if full:
prefixes.append("## PR Review")
prefixes.append("## PR Reviewer Guide")
if incremental:
prefixes.append("## Incremental PR Review")
prefixes.append("## Incremental PR Reviewer Guide")
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]
@ -217,7 +217,7 @@ class GithubProvider(GitProvider):
latest_commit_url = self.get_latest_commit_url()
comment_url = self.get_comment_url(comment)
if update_header:
updated_header = f"{initial_header}\n\n### ({name.capitalize()} updated until commit {latest_commit_url})\n"
updated_header = f"{initial_header}\n\n#### ({name.capitalize()} updated until commit {latest_commit_url})\n"
pr_comment_updated = pr_comment.replace(initial_header, updated_header)
else:
pr_comment_updated = pr_comment