mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
Merge pull request #90 from zmeir/zmeir-output_progress
Add Option to Control Comment Publishing Progress
This commit is contained in:
@ -105,6 +105,9 @@ class GithubProvider(GitProvider):
|
|||||||
# self.pr.create_issue_comment(pr_comment)
|
# self.pr.create_issue_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):
|
||||||
|
if is_temporary and not settings.config.publish_output_progress:
|
||||||
|
logging.debug(f"Skipping publish_comment for temporary comment: {pr_comment}")
|
||||||
|
return
|
||||||
response = self.pr.create_issue_comment(pr_comment)
|
response = self.pr.create_issue_comment(pr_comment)
|
||||||
if hasattr(response, "user") and hasattr(response.user, "login"):
|
if hasattr(response, "user") and hasattr(response.user, "login"):
|
||||||
self.github_user_id = response.user.login
|
self.github_user_id = response.user.login
|
||||||
@ -205,7 +208,7 @@ class GithubProvider(GitProvider):
|
|||||||
|
|
||||||
def remove_initial_comment(self):
|
def remove_initial_comment(self):
|
||||||
try:
|
try:
|
||||||
for comment in self.pr.comments_list:
|
for comment in getattr(self.pr, 'comments_list', []):
|
||||||
if comment.is_temporary:
|
if comment.is_temporary:
|
||||||
comment.delete()
|
comment.delete()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
model="gpt-4-0613"
|
model="gpt-4-0613"
|
||||||
git_provider="github"
|
git_provider="github"
|
||||||
publish_output=true
|
publish_output=true
|
||||||
|
publish_output_progress=true
|
||||||
verbosity_level=0 # 0,1,2
|
verbosity_level=0 # 0,1,2
|
||||||
|
|
||||||
[pr_reviewer]
|
[pr_reviewer]
|
||||||
|
Reference in New Issue
Block a user