{"action":"created","comment":{"url":"https://api.github.com/repos/BBC-News/simorgh/pulls/comments/242519486","pull_request_review_id":186046045,"id":242519486,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjUxOTQ4Ng==","diff_hunk":"@@ -0,0 +1,44 @@\n+import React from 'react';\n+import { shouldMatchSnapshot } from '../../../../helpers/tests/testHelpers';\n+import { custom, landscape, portrait, square } from './fixtureData';\n+\n+const snapshotTests = Component => {\n+  shouldMatchSnapshot(\n+    'should render landscape image correctly',\n+    <Component\n+      alt={landscape.alt}\n+      src={landscape.src}\n+      height={landscape.height}\n+      width={landscape.width}\n+    />,\n+  );\n+  shouldMatchSnapshot(\n+    'should render portrait image correctly',\n+    <Component\n+      alt={portrait.alt}\n+      src={portrait.src}\n+      height={portrait.height}\n+      width={portrait.width}\n+    />,\n+  );\n+  shouldMatchSnapshot(\n+    'should render square image correctly',\n+    <Component\n+      alt={square.alt}\n+      src={square.src}\n+      height={square.height}\n+      width={square.width}\n+    />,\n+  );\n+  shouldMatchSnapshot(","path":"src/app/components/Figure/Image/testHelpers/snapshotTests.jsx","position":33,"original_position":33,"commit_id":"aba7527e29fc17d9d16adbda6dd55d9bf35f7d52","original_commit_id":"aba7527e29fc17d9d16adbda6dd55d9bf35f7d52","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Similar blocks of code found in 4 locations. Consider refactoring.","created_at":"2018-12-18T12:35:15Z","updated_at":"2018-12-18T12:35:16Z","html_url":"https://github.com/BBC-News/simorgh/pull/1101#discussion_r242519486","pull_request_url":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/BBC-News/simorgh/pulls/comments/242519486"},"html":{"href":"https://github.com/BBC-News/simorgh/pull/1101#discussion_r242519486"},"pull_request":{"href":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101"}}},"pull_request":{"url":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101","id":239125182,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MTI1MTgy","html_url":"https://github.com/BBC-News/simorgh/pull/1101","diff_url":"https://github.com/BBC-News/simorgh/pull/1101.diff","patch_url":"https://github.com/BBC-News/simorgh/pull/1101.patch","issue_url":"https://api.github.com/repos/BBC-News/simorgh/issues/1101","number":1101,"state":"open","locked":false,"title":"Amp Img","user":{"login":"sareh","id":3028997,"node_id":"MDQ6VXNlcjMwMjg5OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/3028997?v=4","gravatar_id":"","url":"https://api.github.com/users/sareh","html_url":"https://github.com/sareh","followers_url":"https://api.github.com/users/sareh/followers","following_url":"https://api.github.com/users/sareh/following{/other_user}","gists_url":"https://api.github.com/users/sareh/gists{/gist_id}","starred_url":"https://api.github.com/users/sareh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sareh/subscriptions","organizations_url":"https://api.github.com/users/sareh/orgs","repos_url":"https://api.github.com/users/sareh/repos","events_url":"https://api.github.com/users/sareh/events{/privacy}","received_events_url":"https://api.github.com/users/sareh/received_events","type":"User","site_admin":false},"body":"Resolves #929\r\n\r\nAdding an AmpImg component that extends Img. \r\n\r\nIntegrating it into FigureContainer.\r\n\r\n**Testing notes**\r\nVisiting a canonical page renders images with `<img>`, with attributes `alt`, `src`, `height` and `width`.\r\nhttp://localhost:7080/news/articles/c9rpqy7pmypo\r\n<img width=\"247\" alt=\"screen shot 2018-12-18 at 09 44 31\" src=\"https://user-images.githubusercontent.com/3028997/50145455-8c6a0e00-02a9-11e9-8d02-4c69d799d2db.png\">\r\n\r\n\r\nVisiting an amp page renders images with `<amp-img>`, with attributes `alt`, `src`, `height` and `width`.\r\nhttp://localhost:7080/news/articles/c9rpqy7pmypo.amp\r\n\r\n<img width=\"266\" alt=\"screen shot 2018-12-18 at 09 42 45\" src=\"https://user-images.githubusercontent.com/3028997/50145457-8c6a0e00-02a9-11e9-9a42-567110239318.png\">\r\n\r\n- [x] I have assigned myself to this PR and the corresponding issues\r\n- [x] Tests added for new features\r\n- [ ] Test engineer approval\r\n- [ ] I have followed [the merging checklist](https://github.com/bbc/simorgh-infrastructure/blob/latest/documentation/MERGE_PROCESS.md) and this is ready to merge.\r\n","created_at":"2018-12-17T12:19:42Z","updated_at":"2018-12-18T12:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bd793203dc66706b648234d168ee21c9f314410","assignee":{"login":"sareh","id":3028997,"node_id":"MDQ6VXNlcjMwMjg5OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/3028997?v=4","gravatar_id":"","url":"https://api.github.com/users/sareh","html_url":"https://github.com/sareh","followers_url":"https://api.github.com/users/sareh/followers","following_url":"https://api.github.com/users/sareh/following{/other_user}","gists_url":"https://api.github.com/users/sareh/gists{/gist_id}","starred_url":"https://api.github.com/users/sareh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sareh/subscriptions","organizations_url":"https://api.github.com/users/sareh/orgs","repos_url":"https://api.github.com/users/sareh/repos","events_url":"https://api.github.com/users/sareh/events{/privacy}","received_events_url":"https://api.github.com/users/sareh/received_events","type":"User","site_admin":false},"assignees":[{"login":"sareh","id":3028997,"node_id":"MDQ6VXNlcjMwMjg5OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/3028997?v=4","gravatar_id":"","url":"https://api.github.com/users/sareh","html_url":"https://github.com/sareh","followers_url":"https://api.github.com/users/sareh/followers","following_url":"https://api.github.com/users/sareh/following{/other_user}","gists_url":"https://api.github.com/users/sareh/gists{/gist_id}","starred_url":"https://api.github.com/users/sareh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sareh/subscriptions","organizations_url":"https://api.github.com/users/sareh/orgs","repos_url":"https://api.github.com/users/sareh/repos","events_url":"https://api.github.com/users/sareh/events{/privacy}","received_events_url":"https://api.github.com/users/sareh/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1111389899,"node_id":"MDU6TGFiZWwxMTExMzg5ODk5","url":"https://api.github.com/repos/BBC-News/simorgh/labels/alpha-2","name":"alpha-2","color":"8ddb51","default":false},{"id":1057020083,"node_id":"MDU6TGFiZWwxMDU3MDIwMDgz","url":"https://api.github.com/repos/BBC-News/simorgh/labels/high%20priority","name":"high priority","color":"d62a69","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101/commits","review_comments_url":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101/comments","review_comment_url":"https://api.github.com/repos/BBC-News/simorgh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BBC-News/simorgh/issues/1101/comments","statuses_url":"https://api.github.com/repos/BBC-News/simorgh/statuses/aba7527e29fc17d9d16adbda6dd55d9bf35f7d52","head":{"label":"BBC-News:amp-img","ref":"amp-img","sha":"aba7527e29fc17d9d16adbda6dd55d9bf35f7d52","user":{"login":"BBC-News","id":1401475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDE0NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1401475?v=4","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"repo":{"id":133968906,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM5Njg5MDY=","name":"simorgh","full_name":"BBC-News/simorgh","private":false,"owner":{"login":"BBC-News","id":1401475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDE0NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1401475?v=4","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BBC-News/simorgh","description":"The BBC's new article (soon... we hope)","fork":false,"url":"https://api.github.com/repos/BBC-News/simorgh","forks_url":"https://api.github.com/repos/BBC-News/simorgh/forks","keys_url":"https://api.github.com/repos/BBC-News/simorgh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BBC-News/simorgh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BBC-News/simorgh/teams","hooks_url":"https://api.github.com/repos/BBC-News/simorgh/hooks","issue_events_url":"https://api.github.com/repos/BBC-News/simorgh/issues/events{/number}","events_url":"https://api.github.com/repos/BBC-News/simorgh/events","assignees_url":"https://api.github.com/repos/BBC-News/simorgh/assignees{/user}","branches_url":"https://api.github.com/repos/BBC-News/simorgh/branches{/branch}","tags_url":"https://api.github.com/repos/BBC-News/simorgh/tags","blobs_url":"https://api.github.com/repos/BBC-News/simorgh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BBC-News/simorgh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BBC-News/simorgh/git/refs{/sha}","trees_url":"https://api.github.com/repos/BBC-News/simorgh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BBC-News/simorgh/statuses/{sha}","languages_url":"https://api.github.com/repos/BBC-News/simorgh/languages","stargazers_url":"https://api.github.com/repos/BBC-News/simorgh/stargazers","contributors_url":"https://api.github.com/repos/BBC-News/simorgh/contributors","subscribers_url":"https://api.github.com/repos/BBC-News/simorgh/subscribers","subscription_url":"https://api.github.com/repos/BBC-News/simorgh/subscription","commits_url":"https://api.github.com/repos/BBC-News/simorgh/commits{/sha}","git_commits_url":"https://api.github.com/repos/BBC-News/simorgh/git/commits{/sha}","comments_url":"https://api.github.com/repos/BBC-News/simorgh/comments{/number}","issue_comment_url":"https://api.github.com/repos/BBC-News/simorgh/issues/comments{/number}","contents_url":"https://api.github.com/repos/BBC-News/simorgh/contents/{+path}","compare_url":"https://api.github.com/repos/BBC-News/simorgh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BBC-News/simorgh/merges","archive_url":"https://api.github.com/repos/BBC-News/simorgh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BBC-News/simorgh/downloads","issues_url":"https://api.github.com/repos/BBC-News/simorgh/issues{/number}","pulls_url":"https://api.github.com/repos/BBC-News/simorgh/pulls{/number}","milestones_url":"https://api.github.com/repos/BBC-News/simorgh/milestones{/number}","notifications_url":"https://api.github.com/repos/BBC-News/simorgh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BBC-News/simorgh/labels{/name}","releases_url":"https://api.github.com/repos/BBC-News/simorgh/releases{/id}","deployments_url":"https://api.github.com/repos/BBC-News/simorgh/deployments","created_at":"2018-05-18T14:59:42Z","updated_at":"2018-12-17T15:36:35Z","pushed_at":"2018-12-18T12:31:48Z","git_url":"git://github.com/BBC-News/simorgh.git","ssh_url":"git@github.com:BBC-News/simorgh.git","clone_url":"https://github.com/BBC-News/simorgh.git","svn_url":"https://github.com/BBC-News/simorgh","homepage":"https://www.bbc.com","size":26823,"stargazers_count":76,"watchers_count":76,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":118,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":14,"open_issues":118,"watchers":76,"default_branch":"latest"}},"base":{"label":"BBC-News:latest","ref":"latest","sha":"e430f572903ada27e1d28c659de537a73848ad3a","user":{"login":"BBC-News","id":1401475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDE0NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1401475?v=4","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"repo":{"id":133968906,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM5Njg5MDY=","name":"simorgh","full_name":"BBC-News/simorgh","private":false,"owner":{"login":"BBC-News","id":1401475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDE0NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1401475?v=4","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BBC-News/simorgh","description":"The BBC's new article (soon... we hope)","fork":false,"url":"https://api.github.com/repos/BBC-News/simorgh","forks_url":"https://api.github.com/repos/BBC-News/simorgh/forks","keys_url":"https://api.github.com/repos/BBC-News/simorgh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BBC-News/simorgh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BBC-News/simorgh/teams","hooks_url":"https://api.github.com/repos/BBC-News/simorgh/hooks","issue_events_url":"https://api.github.com/repos/BBC-News/simorgh/issues/events{/number}","events_url":"https://api.github.com/repos/BBC-News/simorgh/events","assignees_url":"https://api.github.com/repos/BBC-News/simorgh/assignees{/user}","branches_url":"https://api.github.com/repos/BBC-News/simorgh/branches{/branch}","tags_url":"https://api.github.com/repos/BBC-News/simorgh/tags","blobs_url":"https://api.github.com/repos/BBC-News/simorgh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BBC-News/simorgh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BBC-News/simorgh/git/refs{/sha}","trees_url":"https://api.github.com/repos/BBC-News/simorgh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BBC-News/simorgh/statuses/{sha}","languages_url":"https://api.github.com/repos/BBC-News/simorgh/languages","stargazers_url":"https://api.github.com/repos/BBC-News/simorgh/stargazers","contributors_url":"https://api.github.com/repos/BBC-News/simorgh/contributors","subscribers_url":"https://api.github.com/repos/BBC-News/simorgh/subscribers","subscription_url":"https://api.github.com/repos/BBC-News/simorgh/subscription","commits_url":"https://api.github.com/repos/BBC-News/simorgh/commits{/sha}","git_commits_url":"https://api.github.com/repos/BBC-News/simorgh/git/commits{/sha}","comments_url":"https://api.github.com/repos/BBC-News/simorgh/comments{/number}","issue_comment_url":"https://api.github.com/repos/BBC-News/simorgh/issues/comments{/number}","contents_url":"https://api.github.com/repos/BBC-News/simorgh/contents/{+path}","compare_url":"https://api.github.com/repos/BBC-News/simorgh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BBC-News/simorgh/merges","archive_url":"https://api.github.com/repos/BBC-News/simorgh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BBC-News/simorgh/downloads","issues_url":"https://api.github.com/repos/BBC-News/simorgh/issues{/number}","pulls_url":"https://api.github.com/repos/BBC-News/simorgh/pulls{/number}","milestones_url":"https://api.github.com/repos/BBC-News/simorgh/milestones{/number}","notifications_url":"https://api.github.com/repos/BBC-News/simorgh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BBC-News/simorgh/labels{/name}","releases_url":"https://api.github.com/repos/BBC-News/simorgh/releases{/id}","deployments_url":"https://api.github.com/repos/BBC-News/simorgh/deployments","created_at":"2018-05-18T14:59:42Z","updated_at":"2018-12-17T15:36:35Z","pushed_at":"2018-12-18T12:31:48Z","git_url":"git://github.com/BBC-News/simorgh.git","ssh_url":"git@github.com:BBC-News/simorgh.git","clone_url":"https://github.com/BBC-News/simorgh.git","svn_url":"https://github.com/BBC-News/simorgh","homepage":"https://www.bbc.com","size":26823,"stargazers_count":76,"watchers_count":76,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":118,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":14,"open_issues":118,"watchers":76,"default_branch":"latest"}},"_links":{"self":{"href":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101"},"html":{"href":"https://github.com/BBC-News/simorgh/pull/1101"},"issue":{"href":"https://api.github.com/repos/BBC-News/simorgh/issues/1101"},"comments":{"href":"https://api.github.com/repos/BBC-News/simorgh/issues/1101/comments"},"review_comments":{"href":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101/comments"},"review_comment":{"href":"https://api.github.com/repos/BBC-News/simorgh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BBC-News/simorgh/pulls/1101/commits"},"statuses":{"href":"https://api.github.com/repos/BBC-News/simorgh/statuses/aba7527e29fc17d9d16adbda6dd55d9bf35f7d52"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codeclimate"}}