Merge pull request #1671 from qodo-ai/of/pr-reviewer-error-handling

fix: add error handling for missing review data in PR reviewer
This commit is contained in:
ofir-frd 2025-04-03 13:26:38 +03:00 committed by GitHub
commit 1710cd49f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,6 +229,10 @@ class PRReviewer:
first_key=first_key, last_key=last_key)
github_action_output(data, 'review')
if 'review' not in data:
get_logger().exception("Failed to parse review data", artifact={"data": data})
return ""
# move data['review'] 'key_issues_to_review' key to the end of the dictionary
if 'key_issues_to_review' in data['review']:
key_issues_to_review = data['review'].pop('key_issues_to_review')