mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
s
This commit is contained in:
@ -230,14 +230,11 @@ class GithubProvider(GitProvider):
|
|||||||
if get_settings().config.verbosity_level >= 2:
|
if get_settings().config.verbosity_level >= 2:
|
||||||
get_logger().error(f"Failed to publish inline comments")
|
get_logger().error(f"Failed to publish inline comments")
|
||||||
|
|
||||||
if (
|
if (getattr(e, "status", None) == 422
|
||||||
getattr(e, "status", None) == 422
|
and get_settings().github.publish_inline_comments_fallback_with_verification and not disable_fallback):
|
||||||
and get_settings().github.publish_inline_comments_fallback_with_verification
|
|
||||||
and not disable_fallback
|
|
||||||
):
|
|
||||||
pass # continue to try _publish_inline_comments_fallback_with_verification
|
pass # continue to try _publish_inline_comments_fallback_with_verification
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e # will end up with publishing the comments one by one
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._publish_inline_comments_fallback_with_verification(comments)
|
self._publish_inline_comments_fallback_with_verification(comments)
|
||||||
@ -274,19 +271,6 @@ class GithubProvider(GitProvider):
|
|||||||
if get_settings().config.verbosity_level >= 2:
|
if get_settings().config.verbosity_level >= 2:
|
||||||
get_logger().error(f"Failed to publish invalid comment as a single line comment: {comment}")
|
get_logger().error(f"Failed to publish invalid comment as a single line comment: {comment}")
|
||||||
|
|
||||||
# verified_comments, invalid_comments = self._verify_inline_comments(comments)
|
|
||||||
# if invalid_comments and get_settings().github.try_fix_invalid_inline_comments:
|
|
||||||
# fixed_comments = self._try_fix_invalid_inline_comments([comment for comment, _ in invalid_comments])
|
|
||||||
# verified_fixed_comments, invalid_fixed_comments = self._verify_inline_comments(fixed_comments)
|
|
||||||
# verified_comments += verified_fixed_comments
|
|
||||||
# invalid_comments += invalid_fixed_comments
|
|
||||||
# if invalid_comments and get_settings().config.verbosity_level >= 2:
|
|
||||||
# get_logger().error(f"Dropped {len(invalid_comments)} invalid comments: {invalid_comments}")
|
|
||||||
# if verified_comments:
|
|
||||||
# self.pr.create_review(commit=self.last_commit_id, comments=verified_comments)
|
|
||||||
# elif get_settings().config.verbosity_level >= 2:
|
|
||||||
# get_logger().error("Dropped all comments - no verified comments left to publish")
|
|
||||||
|
|
||||||
def _verify_code_comment(self, comment: dict):
|
def _verify_code_comment(self, comment: dict):
|
||||||
is_verified = False
|
is_verified = False
|
||||||
e = None
|
e = None
|
||||||
|
Reference in New Issue
Block a user