{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/pandora/pulls/comments/36056245","id":36056245,"diff_hunk":"@@ -121,45 +194,24 @@ private Representation getForumRepresentation(User user, int siteId, Forum forum\n         .withProperty(\"isEditable\", forum.getIsEditable())\n         .withProperty(\"isDeleted\", forum.getIsDeleted())\n         .withProperty(\"requesterId\", user.getUserId());\n+  }\n \n-    if (withPaginationLinks) {\n-\n-      Link linkToFirst = linkBuilder.buildLinkWithLimitAndPage(uriInfo, \"first\",\n-                                                               ForumResource.class, \"getForum\",\n-                                                               limit,\n-                                                               ForumService.THREAD_PAGE_DEFAULT,\n-                                                               sortKey, sortDirection,\n-                                                               responseGroup, siteId,\n-                                                               forum.getId());\n-      representation.withLink(\"first\", linkToFirst.getUri());\n-\n-      Integer lastPage = PaginationHelper.calculateLastPage(limit, forum.getThreadCount());\n-      if (lastPage > 0) {\n-        Link linkToLast = linkBuilder.buildLinkWithLimitAndPage(uriInfo, \"last\",\n-                                                                ForumResource.class, \"getForum\",\n-                                                                limit, lastPage, sortKey,\n-                                                                sortDirection, responseGroup,\n-                                                                siteId, forum.getId());\n-        representation.withLink(\"last\", linkToLast.getUri());\n-      }\n-\n-      if (PaginationHelper.hasNextPage(limit, page, forum.getThreadCount())) {\n-        Link linkToNext = linkBuilder.buildLinkWithLimitAndPage(uriInfo, \"next\",\n-                                                                ForumResource.class, \"getForum\",\n-                                                                limit, page + 1, sortKey,\n-                                                                sortDirection, responseGroup,\n-                                                                siteId, forum.getId());\n-        representation.withLink(\"next\", linkToNext.getUri());\n-      }\n+  private Representation addThreadRepresentation(Representation representation,","path":"service/discussion/src/main/java/com/wikia/discussionservice/mappers/HalForumRepresentationMapper.java","position":227,"original_position":227,"commit_id":"103753a8f77e36883dbecff4837bcd84adba3c1b","original_commit_id":"103753a8f77e36883dbecff4837bcd84adba3c1b","user":{"login":"WikiaTech","id":13279985,"avatar_url":"https://avatars.githubusercontent.com/u/13279985?v=3","gravatar_id":"","url":"https://api.github.com/users/WikiaTech","html_url":"https://github.com/WikiaTech","followers_url":"https://api.github.com/users/WikiaTech/followers","following_url":"https://api.github.com/users/WikiaTech/following{/other_user}","gists_url":"https://api.github.com/users/WikiaTech/gists{/gist_id}","starred_url":"https://api.github.com/users/WikiaTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WikiaTech/subscriptions","organizations_url":"https://api.github.com/users/WikiaTech/orgs","repos_url":"https://api.github.com/users/WikiaTech/repos","events_url":"https://api.github.com/users/WikiaTech/events{/privacy}","received_events_url":"https://api.github.com/users/WikiaTech/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Method has 10 parameters, which is greater than 7 authorized. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://nemo.sonarqube.org/coding_rules#rule_key=squid%3AS00107)\n","created_at":"2015-08-03T05:00:26Z","updated_at":"2015-08-03T05:00:26Z","html_url":"https://github.com/Wikia/pandora/pull/370#discussion_r36056245","pull_request_url":"https://api.github.com/repos/Wikia/pandora/pulls/370","_links":{"self":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/comments/36056245"},"html":{"href":"https://github.com/Wikia/pandora/pull/370#discussion_r36056245"},"pull_request":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/370"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/pandora/pulls/370","id":41435040,"html_url":"https://github.com/Wikia/pandora/pull/370","diff_url":"https://github.com/Wikia/pandora/pull/370.diff","patch_url":"https://github.com/Wikia/pandora/pull/370.patch","issue_url":"https://api.github.com/repos/Wikia/pandora/issues/370","number":370,"state":"open","locked":false,"title":"DIS-134 Pivot support for thread list and post list pagination","user":{"login":"armonr","id":1141431,"avatar_url":"https://avatars.githubusercontent.com/u/1141431?v=3","gravatar_id":"","url":"https://api.github.com/users/armonr","html_url":"https://github.com/armonr","followers_url":"https://api.github.com/users/armonr/followers","following_url":"https://api.github.com/users/armonr/following{/other_user}","gists_url":"https://api.github.com/users/armonr/gists{/gist_id}","starred_url":"https://api.github.com/users/armonr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armonr/subscriptions","organizations_url":"https://api.github.com/users/armonr/orgs","repos_url":"https://api.github.com/users/armonr/repos","events_url":"https://api.github.com/users/armonr/events{/privacy}","received_events_url":"https://api.github.com/users/armonr/received_events","type":"User","site_admin":false},"body":"* Addition of constant pivot id to all pagination links\r\n* Support separate interfaces for \"newer\" links.\r\n* Newer link for lists sorted creation_date/descending on page zero.\r\n\r\n@jimmordino @jogura \r\n\r\nhttps://wikia-inc.atlassian.net/browse/DIS-134","created_at":"2015-08-03T04:59:51Z","updated_at":"2015-08-03T05:00:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7deb8e03964d86581bf02d267bad74a617586339","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/pandora/pulls/370/commits","review_comments_url":"https://api.github.com/repos/Wikia/pandora/pulls/370/comments","review_comment_url":"https://api.github.com/repos/Wikia/pandora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/pandora/issues/370/comments","statuses_url":"https://api.github.com/repos/Wikia/pandora/statuses/103753a8f77e36883dbecff4837bcd84adba3c1b","head":{"label":"Wikia:DIS-134","ref":"DIS-134","sha":"103753a8f77e36883dbecff4837bcd84adba3c1b","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":26663749,"name":"pandora","full_name":"Wikia/pandora","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/pandora","description":"API Service","fork":false,"url":"https://api.github.com/repos/Wikia/pandora","forks_url":"https://api.github.com/repos/Wikia/pandora/forks","keys_url":"https://api.github.com/repos/Wikia/pandora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/pandora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/pandora/teams","hooks_url":"https://api.github.com/repos/Wikia/pandora/hooks","issue_events_url":"https://api.github.com/repos/Wikia/pandora/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/pandora/events","assignees_url":"https://api.github.com/repos/Wikia/pandora/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/pandora/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/pandora/tags","blobs_url":"https://api.github.com/repos/Wikia/pandora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/pandora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/pandora/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/pandora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/pandora/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/pandora/languages","stargazers_url":"https://api.github.com/repos/Wikia/pandora/stargazers","contributors_url":"https://api.github.com/repos/Wikia/pandora/contributors","subscribers_url":"https://api.github.com/repos/Wikia/pandora/subscribers","subscription_url":"https://api.github.com/repos/Wikia/pandora/subscription","commits_url":"https://api.github.com/repos/Wikia/pandora/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/pandora/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/pandora/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/pandora/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/pandora/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/pandora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/pandora/merges","archive_url":"https://api.github.com/repos/Wikia/pandora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/pandora/downloads","issues_url":"https://api.github.com/repos/Wikia/pandora/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/pandora/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/pandora/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/pandora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/pandora/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/pandora/releases{/id}","created_at":"2014-11-15T00:29:06Z","updated_at":"2015-06-16T15:38:56Z","pushed_at":"2015-08-03T04:59:53Z","git_url":"git://github.com/Wikia/pandora.git","ssh_url":"git@github.com:Wikia/pandora.git","clone_url":"https://github.com/Wikia/pandora.git","svn_url":"https://github.com/Wikia/pandora","homepage":null,"size":19211,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"Wikia:dis-master","ref":"dis-master","sha":"6e2bc01169e03190938fb13ac95297049e641a06","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":26663749,"name":"pandora","full_name":"Wikia/pandora","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/pandora","description":"API Service","fork":false,"url":"https://api.github.com/repos/Wikia/pandora","forks_url":"https://api.github.com/repos/Wikia/pandora/forks","keys_url":"https://api.github.com/repos/Wikia/pandora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/pandora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/pandora/teams","hooks_url":"https://api.github.com/repos/Wikia/pandora/hooks","issue_events_url":"https://api.github.com/repos/Wikia/pandora/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/pandora/events","assignees_url":"https://api.github.com/repos/Wikia/pandora/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/pandora/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/pandora/tags","blobs_url":"https://api.github.com/repos/Wikia/pandora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/pandora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/pandora/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/pandora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/pandora/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/pandora/languages","stargazers_url":"https://api.github.com/repos/Wikia/pandora/stargazers","contributors_url":"https://api.github.com/repos/Wikia/pandora/contributors","subscribers_url":"https://api.github.com/repos/Wikia/pandora/subscribers","subscription_url":"https://api.github.com/repos/Wikia/pandora/subscription","commits_url":"https://api.github.com/repos/Wikia/pandora/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/pandora/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/pandora/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/pandora/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/pandora/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/pandora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/pandora/merges","archive_url":"https://api.github.com/repos/Wikia/pandora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/pandora/downloads","issues_url":"https://api.github.com/repos/Wikia/pandora/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/pandora/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/pandora/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/pandora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/pandora/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/pandora/releases{/id}","created_at":"2014-11-15T00:29:06Z","updated_at":"2015-06-16T15:38:56Z","pushed_at":"2015-08-03T04:59:53Z","git_url":"git://github.com/Wikia/pandora.git","ssh_url":"git@github.com:Wikia/pandora.git","clone_url":"https://github.com/Wikia/pandora.git","svn_url":"https://github.com/Wikia/pandora","homepage":null,"size":19211,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/370"},"html":{"href":"https://github.com/Wikia/pandora/pull/370"},"issue":{"href":"https://api.github.com/repos/Wikia/pandora/issues/370"},"comments":{"href":"https://api.github.com/repos/Wikia/pandora/issues/370/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/370/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/370/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/pandora/statuses/103753a8f77e36883dbecff4837bcd84adba3c1b"}}}}