Skip to content

Commit

Permalink
Merge pull request #1264 from Codium-ai/tr/commitable_alongside_table
Browse files Browse the repository at this point in the history
dual publishing mode
  • Loading branch information
mrT23 authored Oct 1, 2024
2 parents d801037 + bccc284 commit af5a50a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pr_agent/tools/pr_code_suggestions.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ async def run(self):
final_update_message=final_update_message,
max_previous_comments=get_settings().pr_code_suggestions.max_history_len,
progress_response=self.progress_response)
else:
if self.progress_response:
self.git_provider.edit_comment(self.progress_response, body=pr_body)
else:
self.git_provider.publish_comment(pr_body)

# dual publishing mode
if int(get_settings().pr_code_suggestions.dual_publishing_score_threshold) > 0:
Expand All @@ -184,12 +189,6 @@ async def run(self):
self.push_inline_code_suggestions(data_above_threshold)
except Exception as e:
get_logger().error(f"Failed to publish dual publishing suggestions, error: {e}")
else:
if self.progress_response:
self.git_provider.edit_comment(self.progress_response, body=pr_body)
else:
self.git_provider.publish_comment(pr_body)

else:
self.push_inline_code_suggestions(data)
if self.progress_response:
Expand Down

0 comments on commit af5a50a

Please sign in to comment.