GHPerson#getType() should call populate() only if type is null#2015
Merged
bitwiseman merged 3 commits intohub4j:mainfrom Feb 25, 2025
Merged
GHPerson#getType() should call populate() only if type is null#2015bitwiseman merged 3 commits intohub4j:mainfrom
bitwiseman merged 3 commits intohub4j:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2015 +/- ##
============================================
- Coverage 83.61% 83.57% -0.04%
+ Complexity 2381 2380 -1
============================================
Files 235 235
Lines 7258 7259 +1
Branches 382 382
============================================
- Hits 6069 6067 -2
- Misses 955 956 +1
- Partials 234 236 +2 ☔ View full report in Codecov by Sentry. |
Contributor
Author
|
Please review. The codecov check is failing as it expects me to test the following code block too, which I feel will not be required. Please let me know if I need to add anything here. if (isOffline()) {
return; // cannot populate, will have to live with what we have
}Thanks! |
Member
|
That code coverage hole is odd, but obviously not due to this change. |
bitwiseman
approved these changes
Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While calling the app or app installations endpoints,
typeis returned in the response from GitHub for users and organizations. Do not callpopulate()iftypeis already set. Perhaps we can fix this at the design level to prevent these kinds of bugs (caused because we do not know what fields have been populated already) from occurring altogether, but making a quick fix for this in the meantime.Fixes #1816
Before submitting a PR:
@linkJavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .mvn -D enable-ci clean install sitelocally. If this command doesn't succeed, your change will not pass CI.main. You will create your PR from that branch.When creating a PR: