Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NullPointerException when a reviewer is deleted (#771) #1318

Merged
merged 5 commits into from
Nov 23, 2021

Conversation

sahansera
Copy link
Contributor

@sahansera sahansera commented Nov 23, 2021

Description

This PR was created to add a fix to cover the following scenarios.

  • User A requests a PR review from User B. User B gets deleted. GitHub removes the requested reviewer from the PR.
  • User A requests a PR review from a User B. User A gets deleted. GitHub assigns a ghost account to User A.
  • Also includes an additional test checkPullRequestReviewer to improve coverage.

Fixes #771

Before submitting a PR:

We love getting PRs, but we hate asking people for the same basic changes every time.

  • Push your changes to a branch other than main. Create your PR from that branch.
  • Add JavaDocs and other comments
  • Write tests that run and pass in CI. See CONTRIBUTING.md for details on how to capture snapshot data.
  • Run mvn -D enable-ci clean install site locally. If this command doesn't succeed, your change will not pass CI.

When creating a PR:

  • Fill in the "Description" above.
  • Enable "Allow edits from maintainers".

@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #1318 (614ffcc) into main (7df326e) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1318      +/-   ##
============================================
+ Coverage     78.02%   78.04%   +0.02%     
- Complexity     2027     2029       +2     
============================================
  Files           199      199              
  Lines          6243     6245       +2     
  Branches        356      356              
============================================
+ Hits           4871     4874       +3     
+ Misses         1162     1161       -1     
  Partials        210      210              
Impacted Files Coverage Δ
...n/java/org/kohsuke/github/GHPullRequestReview.java 70.00% <100.00%> (+4.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7df326e...614ffcc. Read the comment docs.

@bitwiseman
Copy link
Member

@sahansera
I edited your description to say "Fixes #771". This will cause that issue to be automatically closed when this PR is merged.

@bitwiseman bitwiseman merged commit a63306d into hub4j:main Nov 23, 2021
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.

NullPointerException when retrieve a review's user if it's deleted
2 participants