{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/comments/169168038","pull_request_review_id":97651364,"id":169168038,"diff_hunk":"@@ -25,5 +25,26 @@\n       subject.run\n       expect(latest_dimension_item.reload.number_of_pdfs).to eq 99\n     end\n+\n+    it 'populates the metadata' do\n+      allow(subject.items_service).to receive(:fetch_raw_json).and_return(\n+        'content_id' => '09hjasdfoj234',\n+        'title' => 'A guide to coding',\n+        'document_type' => 'answer',\n+        'content_purpose_supertype' => 'guide',\n+        'first_published_at' => '2012-10-03T13:19:55.000+00:00',\n+        'public_updated_at' => '2015-06-03T11:13:44.000+00:00',\n+        'updated_at' => '2018-02-09T11:29:59.000+00:00'\n+      )\n+\n+      subject.run\n+      expect(latest_dimension_item.reload.title).to eq('A guide to coding')\n+      expect(latest_dimension_item.reload.content_id).to eq('09hjasdfoj234')\n+      expect(latest_dimension_item.reload.document_type).to eq('answer')\n+      expect(latest_dimension_item.reload.content_purpose_supertype).to eq('guide')\n+      expect(latest_dimension_item.reload.first_published_at).to eq(Date.new.strftime('2012-10-03T13:19:55.000+00:00'))","path":"spec/domain/importers/content_details_spec.rb","position":21,"original_position":21,"commit_id":"379bf3447a97ab3071d25370adeebd9c9398be64","original_commit_id":"379bf3447a97ab3071d25370adeebd9c9398be64","user":{"login":"pmanrubia","id":227328,"avatar_url":"https://avatars2.githubusercontent.com/u/227328?v=4","gravatar_id":"","url":"https://api.github.com/users/pmanrubia","html_url":"https://github.com/pmanrubia","followers_url":"https://api.github.com/users/pmanrubia/followers","following_url":"https://api.github.com/users/pmanrubia/following{/other_user}","gists_url":"https://api.github.com/users/pmanrubia/gists{/gist_id}","starred_url":"https://api.github.com/users/pmanrubia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmanrubia/subscriptions","organizations_url":"https://api.github.com/users/pmanrubia/orgs","repos_url":"https://api.github.com/users/pmanrubia/repos","events_url":"https://api.github.com/users/pmanrubia/events{/privacy}","received_events_url":"https://api.github.com/users/pmanrubia/received_events","type":"User","site_admin":false},"body":"Shouldn't we be using here a `Time` object and not a `Date`?","created_at":"2018-02-19T20:41:00Z","updated_at":"2018-02-19T20:41:30Z","html_url":"https://github.com/alphagov/content-performance-manager/pull/511#discussion_r169168038","pull_request_url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/comments/169168038"},"html":{"href":"https://github.com/alphagov/content-performance-manager/pull/511#discussion_r169168038"},"pull_request":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511","id":170017784,"html_url":"https://github.com/alphagov/content-performance-manager/pull/511","diff_url":"https://github.com/alphagov/content-performance-manager/pull/511.diff","patch_url":"https://github.com/alphagov/content-performance-manager/pull/511.patch","issue_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/511","number":511,"state":"open","locked":false,"title":"Add metadata to item dimension","user":{"login":"KyleMacPherson","id":13124899,"avatar_url":"https://avatars2.githubusercontent.com/u/13124899?v=4","gravatar_id":"","url":"https://api.github.com/users/KyleMacPherson","html_url":"https://github.com/KyleMacPherson","followers_url":"https://api.github.com/users/KyleMacPherson/followers","following_url":"https://api.github.com/users/KyleMacPherson/following{/other_user}","gists_url":"https://api.github.com/users/KyleMacPherson/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleMacPherson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleMacPherson/subscriptions","organizations_url":"https://api.github.com/users/KyleMacPherson/orgs","repos_url":"https://api.github.com/users/KyleMacPherson/repos","events_url":"https://api.github.com/users/KyleMacPherson/events{/privacy}","received_events_url":"https://api.github.com/users/KyleMacPherson/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-19T17:28:13Z","updated_at":"2018-02-19T20:41:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0603d5dc3f797dd4d9476c206120e08d2d4a9082","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511/commits","review_comments_url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511/comments","review_comment_url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/511/comments","statuses_url":"https://api.github.com/repos/alphagov/content-performance-manager/statuses/379bf3447a97ab3071d25370adeebd9c9398be64","head":{"label":"alphagov:add-metadata-to-item-dimension","ref":"add-metadata-to-item-dimension","sha":"379bf3447a97ab3071d25370adeebd9c9398be64","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":73927580,"name":"content-performance-manager","full_name":"alphagov/content-performance-manager","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/content-performance-manager","description":"Supports content designers to audit and improve content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/content-performance-manager","forks_url":"https://api.github.com/repos/alphagov/content-performance-manager/forks","keys_url":"https://api.github.com/repos/alphagov/content-performance-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/content-performance-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/content-performance-manager/teams","hooks_url":"https://api.github.com/repos/alphagov/content-performance-manager/hooks","issue_events_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/content-performance-manager/events","assignees_url":"https://api.github.com/repos/alphagov/content-performance-manager/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/content-performance-manager/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/content-performance-manager/tags","blobs_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/content-performance-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/content-performance-manager/languages","stargazers_url":"https://api.github.com/repos/alphagov/content-performance-manager/stargazers","contributors_url":"https://api.github.com/repos/alphagov/content-performance-manager/contributors","subscribers_url":"https://api.github.com/repos/alphagov/content-performance-manager/subscribers","subscription_url":"https://api.github.com/repos/alphagov/content-performance-manager/subscription","commits_url":"https://api.github.com/repos/alphagov/content-performance-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/content-performance-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/content-performance-manager/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/content-performance-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/content-performance-manager/merges","archive_url":"https://api.github.com/repos/alphagov/content-performance-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/content-performance-manager/downloads","issues_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/content-performance-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/content-performance-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/content-performance-manager/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/content-performance-manager/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/content-performance-manager/deployments","created_at":"2016-11-16T14:22:38Z","updated_at":"2018-01-15T22:22:25Z","pushed_at":"2018-02-19T19:43:20Z","git_url":"git://github.com/alphagov/content-performance-manager.git","ssh_url":"git@github.com:alphagov/content-performance-manager.git","clone_url":"https://github.com/alphagov/content-performance-manager.git","svn_url":"https://github.com/alphagov/content-performance-manager","homepage":"https://docs.publishing.service.gov.uk/apps/content-performance-manager.html","size":2414,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":2,"open_issues":4,"watchers":5,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"1a3029ebc8db499e0f0bbf2a50ac17ec8151358d","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":73927580,"name":"content-performance-manager","full_name":"alphagov/content-performance-manager","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/content-performance-manager","description":"Supports content designers to audit and improve content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/content-performance-manager","forks_url":"https://api.github.com/repos/alphagov/content-performance-manager/forks","keys_url":"https://api.github.com/repos/alphagov/content-performance-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/content-performance-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/content-performance-manager/teams","hooks_url":"https://api.github.com/repos/alphagov/content-performance-manager/hooks","issue_events_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/content-performance-manager/events","assignees_url":"https://api.github.com/repos/alphagov/content-performance-manager/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/content-performance-manager/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/content-performance-manager/tags","blobs_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/content-performance-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/content-performance-manager/languages","stargazers_url":"https://api.github.com/repos/alphagov/content-performance-manager/stargazers","contributors_url":"https://api.github.com/repos/alphagov/content-performance-manager/contributors","subscribers_url":"https://api.github.com/repos/alphagov/content-performance-manager/subscribers","subscription_url":"https://api.github.com/repos/alphagov/content-performance-manager/subscription","commits_url":"https://api.github.com/repos/alphagov/content-performance-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/content-performance-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/content-performance-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/content-performance-manager/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/content-performance-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/content-performance-manager/merges","archive_url":"https://api.github.com/repos/alphagov/content-performance-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/content-performance-manager/downloads","issues_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/content-performance-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/content-performance-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/content-performance-manager/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/content-performance-manager/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/content-performance-manager/deployments","created_at":"2016-11-16T14:22:38Z","updated_at":"2018-01-15T22:22:25Z","pushed_at":"2018-02-19T19:43:20Z","git_url":"git://github.com/alphagov/content-performance-manager.git","ssh_url":"git@github.com:alphagov/content-performance-manager.git","clone_url":"https://github.com/alphagov/content-performance-manager.git","svn_url":"https://github.com/alphagov/content-performance-manager","homepage":"https://docs.publishing.service.gov.uk/apps/content-performance-manager.html","size":2414,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":2,"open_issues":4,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511"},"html":{"href":"https://github.com/alphagov/content-performance-manager/pull/511"},"issue":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/issues/511"},"comments":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/issues/511/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/511/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/content-performance-manager/statuses/379bf3447a97ab3071d25370adeebd9c9398be64"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pmanrubia"}}