diff --git a/src/main/java/com/spotify/github/v3/comment/Comment.java b/src/main/java/com/spotify/github/v3/comment/Comment.java index 9cb7fd16..e50b985a 100644 --- a/src/main/java/com/spotify/github/v3/comment/Comment.java +++ b/src/main/java/com/spotify/github/v3/comment/Comment.java @@ -46,7 +46,7 @@ public interface Comment extends UpdateTracking { URI htmlUrl(); /** Comment ID. */ - int id(); + Long id(); /** The {@link User} that made the comment. */ @Nullable diff --git a/src/main/java/com/spotify/github/v3/issues/Issue.java b/src/main/java/com/spotify/github/v3/issues/Issue.java index 6e663624..f4f1d963 100644 --- a/src/main/java/com/spotify/github/v3/issues/Issue.java +++ b/src/main/java/com/spotify/github/v3/issues/Issue.java @@ -41,7 +41,7 @@ public interface Issue extends CloseTracking { /** ID. */ @Nullable - Integer id(); + Long id(); /** URL. */ @Nullable diff --git a/src/main/java/com/spotify/github/v3/prs/PullRequestItem.java b/src/main/java/com/spotify/github/v3/prs/PullRequestItem.java index 452cf3b2..318716c4 100644 --- a/src/main/java/com/spotify/github/v3/prs/PullRequestItem.java +++ b/src/main/java/com/spotify/github/v3/prs/PullRequestItem.java @@ -43,7 +43,7 @@ public interface PullRequestItem extends CloseTracking { /** ID. */ @Nullable - Integer id(); + Long id(); /** URL. */ @Nullable diff --git a/src/test/java/com/spotify/github/v3/clients/IssueClientTest.java b/src/test/java/com/spotify/github/v3/clients/IssueClientTest.java index b7e898d6..b7b42d19 100644 --- a/src/test/java/com/spotify/github/v3/clients/IssueClientTest.java +++ b/src/test/java/com/spotify/github/v3/clients/IssueClientTest.java @@ -102,8 +102,8 @@ public void testCommentPaginationSpliterator() throws IOException { Async.streamFromPaginatingIterable(pageIterator).collect(toList()); assertThat(listComments.size(), is(30)); - assertThat(listComments.get(0).id(), is(1345268)); - assertThat(listComments.get(listComments.size() - 1).id(), is(1356168)); + assertThat(listComments.get(0).id(), is(1345268L)); + assertThat(listComments.get(listComments.size() - 1).id(), is(1356168L)); } @Test @@ -135,8 +135,8 @@ public void testCommentPaginationForeach() throws IOException { }); assertThat(listComments.size(), is(30)); - assertThat(listComments.get(0).id(), is(1345268)); - assertThat(listComments.get(listComments.size() - 1).id(), is(1356168)); + assertThat(listComments.get(0).id(), is(1345268L)); + assertThat(listComments.get(listComments.size() - 1).id(), is(1356168L)); } @Test @@ -148,7 +148,19 @@ public void testCommentCreated() throws IOException { when(github.post(eq(path), anyString())).thenReturn(completedFuture(response)); final Comment comment = issueClient.createComment(10, "Me too").join(); - assertThat(comment.id(), is(114)); + assertThat(comment.id(), is(114L)); + } + + @Test + public void testCommentCreatedWithLargeId() throws IOException { + final String fixture = loadFixture("clients/comment_created_long_id.json"); + final Response response = createMockResponse("", fixture); + final String path = format(COMMENTS_URI_NUMBER_TEMPLATE, "someowner", "somerepo", 10); + when(github.post(anyString(), anyString(), eq(Comment.class))).thenCallRealMethod(); + when(github.post(eq(path), anyString())).thenReturn(completedFuture(response)); + final Comment comment = issueClient.createComment(10, "Me too").join(); + + assertThat(comment.id(), is(2459198527L)); } @Test @@ -160,7 +172,7 @@ public void testGetIssue() throws IOException { final var issue = issueClient.getIssue(2).join(); - assertThat(issue.id(), is(2)); + assertThat(issue.id(), is(2L)); assertNotNull(issue.labels()); assertFalse(issue.labels().isEmpty()); assertThat(issue.labels().get(0).name(), is("bug")); diff --git a/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java b/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java index bd8b7ace..f6c0ee37 100644 --- a/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java +++ b/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java @@ -539,7 +539,7 @@ public void testCommentCreated() throws IOException { .thenReturn(fixture); final Comment comment = repoClient.createComment("someweirdsha", "Me too").join(); - assertThat(comment.id(), is(123)); + assertThat(comment.id(), is(123L)); assertThat(comment.commitId().get(), is("6dcb09b5b57875f334f61aebed695e2e4193db5e")); } @@ -551,7 +551,7 @@ public void getComment() throws IOException { .thenReturn(fixture); final Comment comment = repoClient.getComment(123).join(); - assertThat(comment.id(), is(123)); + assertThat(comment.id(), is(123L)); assertThat(comment.commitId().get(), is("6dcb09b5b57875f334f61aebed695e2e4193db5e")); } diff --git a/src/test/java/com/spotify/github/v3/prs/PullRequestTest.java b/src/test/java/com/spotify/github/v3/prs/PullRequestTest.java index db9b69bc..fe640a39 100644 --- a/src/test/java/com/spotify/github/v3/prs/PullRequestTest.java +++ b/src/test/java/com/spotify/github/v3/prs/PullRequestTest.java @@ -38,6 +38,8 @@ public void testDeserializationPr() throws IOException { String fixture = Resources.toString(getResource(this.getClass(), "pull_request.json"), defaultCharset()); final PullRequest pr = Json.create().fromJson(fixture, PullRequest.class); + + assertThat(pr.id(), is(1L)); assertThat(pr.nodeId(), is("MDExOlB1bGxSZXF1ZXN0NDI3NDI0Nw==")); assertThat(pr.mergeCommitSha().get(), is("e5bd3914e2e596debea16f433f57875b5b90bcd6")); assertThat(pr.merged(), is(false)); @@ -53,6 +55,19 @@ public void testDeserializationPr() throws IOException { assertThat(pr.labels().get(0).color(),is("ff0000")); } + @Test + public void testDeserializationPrWithLargeId() throws IOException { + String fixture = + Resources.toString(getResource(this.getClass(), "pull_request_long_id.json"), defaultCharset()); + final PullRequest pr = Json.create().fromJson(fixture, PullRequest.class); + + assertThat(pr.id(), is(2459198527L)); + assertThat(pr.head().sha(), is("f74c7f420282f584acd2fb5964202e5b525c3ab8")); + assertThat(pr.merged(), is(false)); + assertThat(pr.mergeable().get(), is(false)); + assertThat(pr.draft(), is(Optional.of(true))); + } + @Test public void testSerializationMergeParams() throws IOException { String fixture = diff --git a/src/test/java/com/spotify/github/v3/search/SearchTest.java b/src/test/java/com/spotify/github/v3/search/SearchTest.java index ab04989c..71a3f92b 100644 --- a/src/test/java/com/spotify/github/v3/search/SearchTest.java +++ b/src/test/java/com/spotify/github/v3/search/SearchTest.java @@ -42,7 +42,7 @@ public static final void assertSearchIssues(final SearchIssues search) { issues.url(), is(URI.create("https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132"))); assertThat(issues.number(), is(132)); - assertThat(issues.id(), is(35802)); + assertThat(issues.id(), is(35802L)); assertThat(issues.title(), is("Line Number Indexes Beyond 20 Not Displayed")); } @@ -54,4 +54,17 @@ public void testDeserialization() throws IOException { final SearchIssues search = Json.create().fromJson(fixture, SearchIssues.class); assertSearchIssues(search); } + + @Test + public void testDeserializationWithLargeIssueId() throws IOException { + final String fixture = + Resources.toString(getResource(this.getClass(), "issues-long-id.json"), defaultCharset()); + + final SearchIssues search = Json.create().fromJson(fixture, SearchIssues.class); + assertThat(search.items().size(), is(1)); + + final Issue issue = search.items().get(0); + assertThat(issue.id(), is(2592843837L)); + assertThat(issue.number(), is(5514)); + } } diff --git a/src/test/resources/com/spotify/github/v3/clients/comment_created_long_id.json b/src/test/resources/com/spotify/github/v3/clients/comment_created_long_id.json new file mode 100644 index 00000000..1ddd888a --- /dev/null +++ b/src/test/resources/com/spotify/github/v3/clients/comment_created_long_id.json @@ -0,0 +1,45 @@ +{ + "url": "https://api.github.com/repos/spotify/github-java-client/issues/comments/1958720937", + "html_url": "https://github.com/spotify/github-java-client/pull/180#issuecomment-1958720937", + "issue_url": "https://api.github.com/repos/spotify/github-java-client/issues/180", + "id": 2459198527, + "node_id": "IC_kwDODynaQc50v7Wp", + "user": { + "login": "vootelerotov", + "id": 1439555, + "node_id": "MDQ6VXNlcjE0Mzk1NTU=", + "avatar_url": "https://avatars.githubusercontent.com/u/1439555?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vootelerotov", + "html_url": "https://github.com/vootelerotov", + "followers_url": "https://api.github.com/users/vootelerotov/followers", + "following_url": "https://api.github.com/users/vootelerotov/following{/other_user}", + "gists_url": "https://api.github.com/users/vootelerotov/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vootelerotov/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vootelerotov/subscriptions", + "organizations_url": "https://api.github.com/users/vootelerotov/orgs", + "repos_url": "https://api.github.com/users/vootelerotov/repos", + "events_url": "https://api.github.com/users/vootelerotov/events{/privacy}", + "received_events_url": "https://api.github.com/users/vootelerotov/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "created_at": "2024-02-22T05:19:44Z", + "updated_at": "2024-02-22T05:19:44Z", + "author_association": "CONTRIBUTOR", + "body": "Ran into this in the wild.", + "reactions": { + "url": "https://api.github.com/repos/spotify/github-java-client/issues/comments/1958720937/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null +} diff --git a/src/test/resources/com/spotify/github/v3/prs/pull_request_long_id.json b/src/test/resources/com/spotify/github/v3/prs/pull_request_long_id.json new file mode 100644 index 00000000..fa4ef17f --- /dev/null +++ b/src/test/resources/com/spotify/github/v3/prs/pull_request_long_id.json @@ -0,0 +1,389 @@ +{ + "url": "https://api.github.com/repos/spotify/scio/pulls/5525", + "id": 2459198527, + "node_id": "PR_kwDOAfa55s6COrI0", + "html_url": "https://github.com/spotify/scio/pull/5525", + "diff_url": "https://github.com/spotify/scio/pull/5525.diff", + "patch_url": "https://github.com/spotify/scio/pull/5525.patch", + "issue_url": "https://api.github.com/repos/spotify/scio/issues/5525", + "number": 5525, + "state": "open", + "locked": false, + "title": "Update beam to 2.61", + "user": { + "login": "RustedBones", + "id": 2845540, + "node_id": "MDQ6VXNlcjI4NDU1NDA=", + "avatar_url": "https://avatars.githubusercontent.com/u/2845540?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/RustedBones", + "html_url": "https://github.com/RustedBones", + "followers_url": "https://api.github.com/users/RustedBones/followers", + "following_url": "https://api.github.com/users/RustedBones/following{/other_user}", + "gists_url": "https://api.github.com/users/RustedBones/gists{/gist_id}", + "starred_url": "https://api.github.com/users/RustedBones/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/RustedBones/subscriptions", + "organizations_url": "https://api.github.com/users/RustedBones/orgs", + "repos_url": "https://api.github.com/users/RustedBones/repos", + "events_url": "https://api.github.com/users/RustedBones/events{/privacy}", + "received_events_url": "https://api.github.com/users/RustedBones/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "body": "Leverages upstream [changes](https://github.com/apache/beam/pull/32482) available for BQ:\r\nAnnotated BQ typed avro translation leverages logical-type to have symmetric read/write. This fixes integration testfailure introduced in https://github.com/spotify/scio/pull/5523", + "created_at": "2024-11-18T10:56:55Z", + "updated_at": "2024-11-19T17:06:12Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [ + + ], + "requested_reviewers": [ + + ], + "requested_teams": [ + + ], + "labels": [ + + ], + "milestone": null, + "draft": true, + "commits_url": "https://api.github.com/repos/spotify/scio/pulls/5525/commits", + "review_comments_url": "https://api.github.com/repos/spotify/scio/pulls/5525/comments", + "review_comment_url": "https://api.github.com/repos/spotify/scio/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/spotify/scio/issues/5525/comments", + "statuses_url": "https://api.github.com/repos/spotify/scio/statuses/f74c7f420282f584acd2fb5964202e5b525c3ab8", + "head": { + "label": "spotify:beam-2.61", + "ref": "beam-2.61", + "sha": "f74c7f420282f584acd2fb5964202e5b525c3ab8", + "user": { + "login": "spotify", + "id": 251374, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI1MTM3NA==", + "avatar_url": "https://avatars.githubusercontent.com/u/251374?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/spotify", + "html_url": "https://github.com/spotify", + "followers_url": "https://api.github.com/users/spotify/followers", + "following_url": "https://api.github.com/users/spotify/following{/other_user}", + "gists_url": "https://api.github.com/users/spotify/gists{/gist_id}", + "starred_url": "https://api.github.com/users/spotify/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/spotify/subscriptions", + "organizations_url": "https://api.github.com/users/spotify/orgs", + "repos_url": "https://api.github.com/users/spotify/repos", + "events_url": "https://api.github.com/users/spotify/events{/privacy}", + "received_events_url": "https://api.github.com/users/spotify/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "repo": { + "id": 32946662, + "node_id": "MDEwOlJlcG9zaXRvcnkzMjk0NjY2Mg==", + "name": "scio", + "full_name": "spotify/scio", + "private": false, + "owner": { + "login": "spotify", + "id": 251374, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI1MTM3NA==", + "avatar_url": "https://avatars.githubusercontent.com/u/251374?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/spotify", + "html_url": "https://github.com/spotify", + "followers_url": "https://api.github.com/users/spotify/followers", + "following_url": "https://api.github.com/users/spotify/following{/other_user}", + "gists_url": "https://api.github.com/users/spotify/gists{/gist_id}", + "starred_url": "https://api.github.com/users/spotify/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/spotify/subscriptions", + "organizations_url": "https://api.github.com/users/spotify/orgs", + "repos_url": "https://api.github.com/users/spotify/repos", + "events_url": "https://api.github.com/users/spotify/events{/privacy}", + "received_events_url": "https://api.github.com/users/spotify/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/spotify/scio", + "description": "A Scala API for Apache Beam and Google Cloud Dataflow.", + "fork": false, + "url": "https://api.github.com/repos/spotify/scio", + "forks_url": "https://api.github.com/repos/spotify/scio/forks", + "keys_url": "https://api.github.com/repos/spotify/scio/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/spotify/scio/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/spotify/scio/teams", + "hooks_url": "https://api.github.com/repos/spotify/scio/hooks", + "issue_events_url": "https://api.github.com/repos/spotify/scio/issues/events{/number}", + "events_url": "https://api.github.com/repos/spotify/scio/events", + "assignees_url": "https://api.github.com/repos/spotify/scio/assignees{/user}", + "branches_url": "https://api.github.com/repos/spotify/scio/branches{/branch}", + "tags_url": "https://api.github.com/repos/spotify/scio/tags", + "blobs_url": "https://api.github.com/repos/spotify/scio/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/spotify/scio/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/spotify/scio/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/spotify/scio/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/spotify/scio/statuses/{sha}", + "languages_url": "https://api.github.com/repos/spotify/scio/languages", + "stargazers_url": "https://api.github.com/repos/spotify/scio/stargazers", + "contributors_url": "https://api.github.com/repos/spotify/scio/contributors", + "subscribers_url": "https://api.github.com/repos/spotify/scio/subscribers", + "subscription_url": "https://api.github.com/repos/spotify/scio/subscription", + "commits_url": "https://api.github.com/repos/spotify/scio/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/spotify/scio/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/spotify/scio/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/spotify/scio/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/spotify/scio/contents/{+path}", + "compare_url": "https://api.github.com/repos/spotify/scio/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/spotify/scio/merges", + "archive_url": "https://api.github.com/repos/spotify/scio/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/spotify/scio/downloads", + "issues_url": "https://api.github.com/repos/spotify/scio/issues{/number}", + "pulls_url": "https://api.github.com/repos/spotify/scio/pulls{/number}", + "milestones_url": "https://api.github.com/repos/spotify/scio/milestones{/number}", + "notifications_url": "https://api.github.com/repos/spotify/scio/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/spotify/scio/labels{/name}", + "releases_url": "https://api.github.com/repos/spotify/scio/releases{/id}", + "deployments_url": "https://api.github.com/repos/spotify/scio/deployments", + "created_at": "2015-03-26T19:07:34Z", + "updated_at": "2024-11-25T02:07:06Z", + "pushed_at": "2024-11-22T09:28:47Z", + "git_url": "git://github.com/spotify/scio.git", + "ssh_url": "git@github.com:spotify/scio.git", + "clone_url": "https://github.com/spotify/scio.git", + "svn_url": "https://github.com/spotify/scio", + "homepage": "https://spotify.github.io/scio", + "size": 70358, + "stargazers_count": 2559, + "watchers_count": 2559, + "language": "Scala", + "has_issues": true, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": true, + "has_discussions": true, + "forks_count": 514, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 143, + "license": { + "key": "apache-2.0", + "name": "Apache License 2.0", + "spdx_id": "Apache-2.0", + "url": "https://api.github.com/licenses/apache-2.0", + "node_id": "MDc6TGljZW5zZTI=" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "batch", + "beam", + "bigquery", + "data", + "dataflow", + "google-cloud", + "ml", + "scala", + "scio", + "streaming" + ], + "visibility": "public", + "forks": 514, + "open_issues": 143, + "watchers": 2559, + "default_branch": "main" + } + }, + "base": { + "label": "spotify:main", + "ref": "main", + "sha": "49f43b028dbd5df9dfb5362714c9fbd76e9019db", + "user": { + "login": "spotify", + "id": 251374, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI1MTM3NA==", + "avatar_url": "https://avatars.githubusercontent.com/u/251374?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/spotify", + "html_url": "https://github.com/spotify", + "followers_url": "https://api.github.com/users/spotify/followers", + "following_url": "https://api.github.com/users/spotify/following{/other_user}", + "gists_url": "https://api.github.com/users/spotify/gists{/gist_id}", + "starred_url": "https://api.github.com/users/spotify/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/spotify/subscriptions", + "organizations_url": "https://api.github.com/users/spotify/orgs", + "repos_url": "https://api.github.com/users/spotify/repos", + "events_url": "https://api.github.com/users/spotify/events{/privacy}", + "received_events_url": "https://api.github.com/users/spotify/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "repo": { + "id": 32946662, + "node_id": "MDEwOlJlcG9zaXRvcnkzMjk0NjY2Mg==", + "name": "scio", + "full_name": "spotify/scio", + "private": false, + "owner": { + "login": "spotify", + "id": 251374, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI1MTM3NA==", + "avatar_url": "https://avatars.githubusercontent.com/u/251374?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/spotify", + "html_url": "https://github.com/spotify", + "followers_url": "https://api.github.com/users/spotify/followers", + "following_url": "https://api.github.com/users/spotify/following{/other_user}", + "gists_url": "https://api.github.com/users/spotify/gists{/gist_id}", + "starred_url": "https://api.github.com/users/spotify/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/spotify/subscriptions", + "organizations_url": "https://api.github.com/users/spotify/orgs", + "repos_url": "https://api.github.com/users/spotify/repos", + "events_url": "https://api.github.com/users/spotify/events{/privacy}", + "received_events_url": "https://api.github.com/users/spotify/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "html_url": "https://github.com/spotify/scio", + "description": "A Scala API for Apache Beam and Google Cloud Dataflow.", + "fork": false, + "url": "https://api.github.com/repos/spotify/scio", + "forks_url": "https://api.github.com/repos/spotify/scio/forks", + "keys_url": "https://api.github.com/repos/spotify/scio/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/spotify/scio/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/spotify/scio/teams", + "hooks_url": "https://api.github.com/repos/spotify/scio/hooks", + "issue_events_url": "https://api.github.com/repos/spotify/scio/issues/events{/number}", + "events_url": "https://api.github.com/repos/spotify/scio/events", + "assignees_url": "https://api.github.com/repos/spotify/scio/assignees{/user}", + "branches_url": "https://api.github.com/repos/spotify/scio/branches{/branch}", + "tags_url": "https://api.github.com/repos/spotify/scio/tags", + "blobs_url": "https://api.github.com/repos/spotify/scio/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/spotify/scio/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/spotify/scio/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/spotify/scio/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/spotify/scio/statuses/{sha}", + "languages_url": "https://api.github.com/repos/spotify/scio/languages", + "stargazers_url": "https://api.github.com/repos/spotify/scio/stargazers", + "contributors_url": "https://api.github.com/repos/spotify/scio/contributors", + "subscribers_url": "https://api.github.com/repos/spotify/scio/subscribers", + "subscription_url": "https://api.github.com/repos/spotify/scio/subscription", + "commits_url": "https://api.github.com/repos/spotify/scio/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/spotify/scio/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/spotify/scio/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/spotify/scio/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/spotify/scio/contents/{+path}", + "compare_url": "https://api.github.com/repos/spotify/scio/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/spotify/scio/merges", + "archive_url": "https://api.github.com/repos/spotify/scio/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/spotify/scio/downloads", + "issues_url": "https://api.github.com/repos/spotify/scio/issues{/number}", + "pulls_url": "https://api.github.com/repos/spotify/scio/pulls{/number}", + "milestones_url": "https://api.github.com/repos/spotify/scio/milestones{/number}", + "notifications_url": "https://api.github.com/repos/spotify/scio/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/spotify/scio/labels{/name}", + "releases_url": "https://api.github.com/repos/spotify/scio/releases{/id}", + "deployments_url": "https://api.github.com/repos/spotify/scio/deployments", + "created_at": "2015-03-26T19:07:34Z", + "updated_at": "2024-11-25T02:07:06Z", + "pushed_at": "2024-11-22T09:28:47Z", + "git_url": "git://github.com/spotify/scio.git", + "ssh_url": "git@github.com:spotify/scio.git", + "clone_url": "https://github.com/spotify/scio.git", + "svn_url": "https://github.com/spotify/scio", + "homepage": "https://spotify.github.io/scio", + "size": 70358, + "stargazers_count": 2559, + "watchers_count": 2559, + "language": "Scala", + "has_issues": true, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": true, + "has_discussions": true, + "forks_count": 514, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 143, + "license": { + "key": "apache-2.0", + "name": "Apache License 2.0", + "spdx_id": "Apache-2.0", + "url": "https://api.github.com/licenses/apache-2.0", + "node_id": "MDc6TGljZW5zZTI=" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "batch", + "beam", + "bigquery", + "data", + "dataflow", + "google-cloud", + "ml", + "scala", + "scio", + "streaming" + ], + "visibility": "public", + "forks": 514, + "open_issues": 143, + "watchers": 2559, + "default_branch": "main" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/spotify/scio/pulls/5525" + }, + "html": { + "href": "https://github.com/spotify/scio/pull/5525" + }, + "issue": { + "href": "https://api.github.com/repos/spotify/scio/issues/5525" + }, + "comments": { + "href": "https://api.github.com/repos/spotify/scio/issues/5525/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/spotify/scio/pulls/5525/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/spotify/scio/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/spotify/scio/pulls/5525/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/spotify/scio/statuses/f74c7f420282f584acd2fb5964202e5b525c3ab8" + } + }, + "author_association": "CONTRIBUTOR", + "auto_merge": null, + "active_lock_reason": null, + "merged": false, + "mergeable": false, + "rebaseable": false, + "mergeable_state": "dirty", + "merged_by": null, + "comments": 1, + "review_comments": 1, + "maintainer_can_modify": false, + "commits": 3, + "additions": 89, + "deletions": 152, + "changed_files": 12 +} \ No newline at end of file diff --git a/src/test/resources/com/spotify/github/v3/search/issues-long-id.json b/src/test/resources/com/spotify/github/v3/search/issues-long-id.json new file mode 100644 index 00000000..428a6431 --- /dev/null +++ b/src/test/resources/com/spotify/github/v3/search/issues-long-id.json @@ -0,0 +1,72 @@ +{ + "total_count": 280, + "incomplete_results": false, + "items": [ + { + "url": "https://api.github.com/repos/spotify/scio/issues/5514", + "repository_url": "https://api.github.com/repos/spotify/scio", + "labels_url": "https://api.github.com/repos/spotify/scio/issues/5514/labels{/name}", + "comments_url": "https://api.github.com/repos/spotify/scio/issues/5514/comments", + "events_url": "https://api.github.com/repos/spotify/scio/issues/5514/events", + "html_url": "https://github.com/spotify/scio/issues/5514", + "id": 2592843837, + "node_id": "I_kwDOAfa55s6ai6g9", + "number": 5514, + "title": "Benchmark BigTable maxPendingRequests", + "user": { + "login": "kellen", + "id": 486691, + "node_id": "MDQ6VXNlcjQ4NjY5MQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/486691?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kellen", + "html_url": "https://github.com/kellen", + "followers_url": "https://api.github.com/users/kellen/followers", + "following_url": "https://api.github.com/users/kellen/following{/other_user}", + "gists_url": "https://api.github.com/users/kellen/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kellen/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kellen/subscriptions", + "organizations_url": "https://api.github.com/users/kellen/orgs", + "repos_url": "https://api.github.com/users/kellen/repos", + "events_url": "https://api.github.com/users/kellen/events{/privacy}", + "received_events_url": "https://api.github.com/users/kellen/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "labels": [ + + ], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [ + + ], + "milestone": null, + "comments": 0, + "created_at": "2024-10-16T19:23:04Z", + "updated_at": "2024-10-16T19:23:40Z", + "closed_at": null, + "author_association": "CONTRIBUTOR", + "active_lock_reason": null, + "body": "Internal spotify discussions suggest that the default `maxPendingRequests=1` may no longer be a good default and a higher value (e.g. `6`) may make more sense for batch. \r\n\r\nWe should write some benchmarks to verify and update the documentation and/or defaults based on the benchmark results.\r\n", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/spotify/scio/issues/5514/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/spotify/scio/issues/5514/timeline", + "performed_via_github_app": null, + "state_reason": null + } + ] +}