github-api icon indicating copy to clipboard operation
github-api copied to clipboard

pr.listReviews().toList(); throws GHFileNotFoundException

Open daniel-b2c2 opened this issue 2 years ago • 1 comments

Describe the bug List<GHPullRequestReview> ghPullRequestReviews = pr.listReviews().toList(); The above code should return an empty list if no reviews exist, instead it throws GHFileNotFoundException

To Reproduce Steps to reproduce the behavior:

  1. Create a pull request (but do not review it)
  2. Search for that pull request, and then list reviews as shown in the code snippet above.
  3. Observe the exception thrown.

Expected behavior Return an empty list when there are no reviews.

Desktop (please complete the following information):

  • OS: mac
  • Browser NA
  • Version 1.318

Additional context I think this is a regression and this behaviour wasn't like this in previous versions?

daniel-b2c2 avatar Dec 05 '23 11:12 daniel-b2c2

I tried to reproduce your issue here: https://github.com/hub4j/github-api/pull/1809

And I couldn't. Maybe it was a transient problem on the GitHub API side?

Please let us know if you can still reproduce it, and if so, a small Maven project reproducing the issue would be very helpful.

gsmet avatar Mar 09 '24 13:03 gsmet