mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
Merge pull request #1184 from MaxHoecker/bugfix/suggestions_error_publish
checking for publish_output in the suggestions tool exception handler
This commit is contained in:
@ -168,14 +168,15 @@ class PRCodeSuggestions:
|
|||||||
get_logger().info('Code suggestions generated for PR, but not published since publish_output is False.')
|
get_logger().info('Code suggestions generated for PR, but not published since publish_output is False.')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
get_logger().error(f"Failed to generate code suggestions for PR, error: {e}")
|
get_logger().error(f"Failed to generate code suggestions for PR, error: {e}")
|
||||||
if self.progress_response:
|
if get_settings().config.publish_output:
|
||||||
self.progress_response.delete()
|
if self.progress_response:
|
||||||
else:
|
self.progress_response.delete()
|
||||||
try:
|
else:
|
||||||
self.git_provider.remove_initial_comment()
|
try:
|
||||||
self.git_provider.publish_comment(f"Failed to generate code suggestions for PR")
|
self.git_provider.remove_initial_comment()
|
||||||
except Exception as e:
|
self.git_provider.publish_comment(f"Failed to generate code suggestions for PR")
|
||||||
pass
|
except Exception as e:
|
||||||
|
pass
|
||||||
|
|
||||||
def publish_persistent_comment_with_history(self, pr_comment: str,
|
def publish_persistent_comment_with_history(self, pr_comment: str,
|
||||||
initial_header: str,
|
initial_header: str,
|
||||||
|
Reference in New Issue
Block a user