{"action":"created","comment":{"url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/comments/168805783","pull_request_review_id":97238146,"id":168805783,"diff_hunk":"@@ -0,0 +1,109 @@\n+package uk.gov.hmcts.cmc.ccd.migration.ccd.repositories;\n+\n+import com.google.common.collect.ImmutableMap;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;\n+import org.springframework.stereotype.Service;\n+import uk.gov.hmcts.cmc.ccd.domain.CCDCase;\n+import uk.gov.hmcts.cmc.ccd.mapper.CaseMapper;\n+import uk.gov.hmcts.cmc.ccd.migration.idam.models.User;\n+import uk.gov.hmcts.cmc.ccd.migration.idam.services.UserService;\n+import uk.gov.hmcts.cmc.ccd.migration.models.mappers.JsonMapper;\n+import uk.gov.hmcts.cmc.domain.models.Claim;\n+import uk.gov.hmcts.reform.authorisation.generators.AuthTokenGenerator;\n+import uk.gov.hmcts.reform.ccd.client.CoreCaseDataApi;\n+import uk.gov.hmcts.reform.ccd.client.model.CaseDetails;\n+\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Optional;\n+import java.util.stream.Collectors;\n+\n+@Service\n+@ConditionalOnProperty(prefix = \"core_case_data\", name = \"api.url\")\n+public class CCDCaseApi {\n+\n+    public static final String JURISDICTION_ID = \"CMC\";\n+    public static final String CASE_TYPE_ID = \"MoneyClaimCase\";\n+\n+    private final CoreCaseDataApi coreCaseDataApi;\n+    private final AuthTokenGenerator authTokenGenerator;\n+    private final UserService userService;\n+    private final CaseMapper caseMapper;","path":"ccd-claim-migration/src/main/java/uk/gov/hmcts/cmc/ccd/migration/ccd/repositories/CCDCaseApi.java","position":33,"original_position":33,"commit_id":"060209fc53460228c16857b89ea05c18f865295b","original_commit_id":"060209fc53460228c16857b89ea05c18f865295b","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Perhaps 'caseMapper' could be replaced by a local variable.](https://app.codacy.com/app/HMCTS/cmc-claim-store/pullRequest?prid=1315232)","created_at":"2018-02-16T16:33:53Z","updated_at":"2018-02-16T16:33:53Z","html_url":"https://github.com/hmcts/cmc-claim-store/pull/187#discussion_r168805783","pull_request_url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/comments/168805783"},"html":{"href":"https://github.com/hmcts/cmc-claim-store/pull/187#discussion_r168805783"},"pull_request":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187"}}},"pull_request":{"url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187","id":167927314,"html_url":"https://github.com/hmcts/cmc-claim-store/pull/187","diff_url":"https://github.com/hmcts/cmc-claim-store/pull/187.diff","patch_url":"https://github.com/hmcts/cmc-claim-store/pull/187.patch","issue_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/187","number":187,"state":"open","locked":false,"title":"WIP roc 2832 migrate claims","user":{"login":"yarpo","id":5647337,"avatar_url":"https://avatars0.githubusercontent.com/u/5647337?v=4","gravatar_id":"","url":"https://api.github.com/users/yarpo","html_url":"https://github.com/yarpo","followers_url":"https://api.github.com/users/yarpo/followers","following_url":"https://api.github.com/users/yarpo/following{/other_user}","gists_url":"https://api.github.com/users/yarpo/gists{/gist_id}","starred_url":"https://api.github.com/users/yarpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarpo/subscriptions","organizations_url":"https://api.github.com/users/yarpo/orgs","repos_url":"https://api.github.com/users/yarpo/repos","events_url":"https://api.github.com/users/yarpo/events{/privacy}","received_events_url":"https://api.github.com/users/yarpo/received_events","type":"User","site_admin":false},"body":"### JIRA link (if applicable) ###\r\n\r\n\r\n\r\n### Change description ###\r\n\r\n\r\n\r\n**Does this PR introduce a breaking change?** (check one with \"x\")\r\n\r\n```\r\n[ ] Yes\r\n[ ] No\r\n```\r\n","created_at":"2018-02-08T10:10:48Z","updated_at":"2018-02-16T16:33:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8259973ca8683c69fac8641a6f944a8cc40ff17","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187/commits","review_comments_url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187/comments","review_comment_url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/187/comments","statuses_url":"https://api.github.com/repos/hmcts/cmc-claim-store/statuses/060209fc53460228c16857b89ea05c18f865295b","head":{"label":"hmcts:feature/ROC-2832-migrate-claims","ref":"feature/ROC-2832-migrate-claims","sha":"060209fc53460228c16857b89ea05c18f865295b","user":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":101856095,"name":"cmc-claim-store","full_name":"hmcts/cmc-claim-store","owner":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/cmc-claim-store","description":"Backend service for Civil Money Claims","fork":false,"url":"https://api.github.com/repos/hmcts/cmc-claim-store","forks_url":"https://api.github.com/repos/hmcts/cmc-claim-store/forks","keys_url":"https://api.github.com/repos/hmcts/cmc-claim-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/cmc-claim-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/cmc-claim-store/teams","hooks_url":"https://api.github.com/repos/hmcts/cmc-claim-store/hooks","issue_events_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/cmc-claim-store/events","assignees_url":"https://api.github.com/repos/hmcts/cmc-claim-store/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/cmc-claim-store/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/cmc-claim-store/tags","blobs_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/cmc-claim-store/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/cmc-claim-store/languages","stargazers_url":"https://api.github.com/repos/hmcts/cmc-claim-store/stargazers","contributors_url":"https://api.github.com/repos/hmcts/cmc-claim-store/contributors","subscribers_url":"https://api.github.com/repos/hmcts/cmc-claim-store/subscribers","subscription_url":"https://api.github.com/repos/hmcts/cmc-claim-store/subscription","commits_url":"https://api.github.com/repos/hmcts/cmc-claim-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/cmc-claim-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/cmc-claim-store/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/cmc-claim-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/cmc-claim-store/merges","archive_url":"https://api.github.com/repos/hmcts/cmc-claim-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/cmc-claim-store/downloads","issues_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/cmc-claim-store/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/cmc-claim-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/cmc-claim-store/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/cmc-claim-store/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/cmc-claim-store/deployments","created_at":"2017-08-30T08:17:34Z","updated_at":"2018-02-14T14:50:30Z","pushed_at":"2018-02-16T16:27:55Z","git_url":"git://github.com/hmcts/cmc-claim-store.git","ssh_url":"git@github.com:hmcts/cmc-claim-store.git","clone_url":"https://github.com/hmcts/cmc-claim-store.git","svn_url":"https://github.com/hmcts/cmc-claim-store","homepage":"","size":1805,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"32f29646033624f2d0b6cff56c678ddc2b54135b","user":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":101856095,"name":"cmc-claim-store","full_name":"hmcts/cmc-claim-store","owner":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/cmc-claim-store","description":"Backend service for Civil Money Claims","fork":false,"url":"https://api.github.com/repos/hmcts/cmc-claim-store","forks_url":"https://api.github.com/repos/hmcts/cmc-claim-store/forks","keys_url":"https://api.github.com/repos/hmcts/cmc-claim-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/cmc-claim-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/cmc-claim-store/teams","hooks_url":"https://api.github.com/repos/hmcts/cmc-claim-store/hooks","issue_events_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/cmc-claim-store/events","assignees_url":"https://api.github.com/repos/hmcts/cmc-claim-store/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/cmc-claim-store/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/cmc-claim-store/tags","blobs_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/cmc-claim-store/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/cmc-claim-store/languages","stargazers_url":"https://api.github.com/repos/hmcts/cmc-claim-store/stargazers","contributors_url":"https://api.github.com/repos/hmcts/cmc-claim-store/contributors","subscribers_url":"https://api.github.com/repos/hmcts/cmc-claim-store/subscribers","subscription_url":"https://api.github.com/repos/hmcts/cmc-claim-store/subscription","commits_url":"https://api.github.com/repos/hmcts/cmc-claim-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/cmc-claim-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/cmc-claim-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/cmc-claim-store/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/cmc-claim-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/cmc-claim-store/merges","archive_url":"https://api.github.com/repos/hmcts/cmc-claim-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/cmc-claim-store/downloads","issues_url":"https://api.github.com/repos/hmcts/cmc-claim-store/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/cmc-claim-store/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/cmc-claim-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/cmc-claim-store/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/cmc-claim-store/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/cmc-claim-store/deployments","created_at":"2017-08-30T08:17:34Z","updated_at":"2018-02-14T14:50:30Z","pushed_at":"2018-02-16T16:27:55Z","git_url":"git://github.com/hmcts/cmc-claim-store.git","ssh_url":"git@github.com:hmcts/cmc-claim-store.git","clone_url":"https://github.com/hmcts/cmc-claim-store.git","svn_url":"https://github.com/hmcts/cmc-claim-store","homepage":"","size":1805,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187"},"html":{"href":"https://github.com/hmcts/cmc-claim-store/pull/187"},"issue":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/187"},"comments":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/cmc-claim-store/statuses/060209fc53460228c16857b89ea05c18f865295b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}