Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 src/main/java/com/spotify/github/v3/prs/Review.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface Review {

/** Id. */
@Nullable
Integer id();
Long id();

/** User. */
@Nullable
Expand Down
16 changes: 15 additions & 1 deletion 16 src/test/java/com/spotify/github/v3/prs/ReviewTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ public void testDeserialization() throws IOException {
Json.create().fromJson(fixture, Review.class);
assertThat(review.state(), is(ReviewState.APPROVED));
assertThat(review.commitId(), is("ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091"));
assertThat(review.id(), is(80));
assertThat(review.id(), is(80L));
}

@Test
public void testDeserializationWithLargeId() throws IOException {
String fixture =
Resources.toString(
getResource(this.getClass(), "review_long_id.json"),
defaultCharset());
final Review review =
Json.create().fromJson(fixture, Review.class);
assertThat(review.state(), is(ReviewState.APPROVED));
assertThat(review.commitId(), is("ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091"));
assertThat(review.id(), is(2459198580L));
}

}
38 changes: 38 additions & 0 deletions 38 src/test/resources/com/spotify/github/v3/prs/review_long_id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"id": 2459198580,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Here is the body for the review.",
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"state": "APPROVED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://api.github.com/repos/octocat/Hello-World/pulls/12"
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.