Skip to content

Conversation

@ArtyomSavchenko
Copy link
Member

@ArtyomSavchenko ArtyomSavchenko commented Nov 19, 2025

Screenshot 2025-11-19 at 12 26 53

Signed-off-by: Artem Savchenko <armisav@gmail.com>
@huly-github-staging
Copy link

Connected to Huly®: UBERF-14133

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a null reference error in the getReviewers method by adding defensive null checks for reviewRequests, latestReviews, and their nested properties. The fix prevents crashes when GitHub's API returns unexpected null values in pull request review data.

  • Added optional chaining and nullish coalescing operators to safely handle null/undefined values
  • Introduced filter steps to remove null entries from arrays before processing
  • Added comprehensive test suite with 11 test cases covering various null/undefined scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
services/github/pod-github/src/sync/pullrequests.ts Added null-safe operators and filters to handle null reviewRequests, latestReviews, and their nested properties
services/github/pod-github/src/sync/tests/pullrequests.test.ts New test file with comprehensive coverage for null/undefined handling scenarios in getReviewers method

Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
@ArtyomSavchenko ArtyomSavchenko merged commit 400e9e9 into develop Nov 19, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants