{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/28335232","id":28335232,"diff_hunk":"@@ -292,6 +292,21 @@ case class LiveBlogDateFormatter(isLiveBlog: Boolean)(implicit val request: Requ\n   }\n }\n \n+case class BloggerBylineImage(article: Article)(implicit val request: RequestHeader) extends HtmlCleaner  {\n+  def clean(body: Document): Document = {\n+    if (article.isLiveBlog && LiveBlogContributorImagesSwitch.isSwitchedOn) {\n+      body.select(\".block\").foreach { el =>\n+        val contributorId = el.attributes().get(\"data-block-contributor\")\n+        article.tags.find(_.id == contributorId).map{ contributorTag =>","path":"common/app/views/support/HtmlCleaner.scala","position":9,"original_position":9,"commit_id":"2fdce29f13f23d6e4f6d4a016c36c20c9baf2284","original_commit_id":"2fdce29f13f23d6e4f6d4a016c36c20c9baf2284","user":{"login":"gklopper","id":76709,"avatar_url":"https://avatars.githubusercontent.com/u/76709?v=3","gravatar_id":"","url":"https://api.github.com/users/gklopper","html_url":"https://github.com/gklopper","followers_url":"https://api.github.com/users/gklopper/followers","following_url":"https://api.github.com/users/gklopper/following{/other_user}","gists_url":"https://api.github.com/users/gklopper/gists{/gist_id}","starred_url":"https://api.github.com/users/gklopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gklopper/subscriptions","organizations_url":"https://api.github.com/users/gklopper/orgs","repos_url":"https://api.github.com/users/gklopper/repos","events_url":"https://api.github.com/users/gklopper/events{/privacy}","received_events_url":"https://api.github.com/users/gklopper/received_events","type":"User","site_admin":false},"body":"You should put some tests in `ArticleFeatureTest` around these.","created_at":"2015-04-14T15:05:42Z","updated_at":"2015-04-14T15:05:42Z","html_url":"https://github.com/guardian/frontend/pull/8865#discussion_r28335232","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/8865","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/28335232"},"html":{"href":"https://github.com/guardian/frontend/pull/8865#discussion_r28335232"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8865"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/8865","id":33262788,"html_url":"https://github.com/guardian/frontend/pull/8865","diff_url":"https://github.com/guardian/frontend/pull/8865.diff","patch_url":"https://github.com/guardian/frontend/pull/8865.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/8865","number":8865,"state":"open","locked":false,"title":"Live blog contributor images","user":{"login":"JustinPinner","id":690395,"avatar_url":"https://avatars.githubusercontent.com/u/690395?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinPinner","html_url":"https://github.com/JustinPinner","followers_url":"https://api.github.com/users/JustinPinner/followers","following_url":"https://api.github.com/users/JustinPinner/following{/other_user}","gists_url":"https://api.github.com/users/JustinPinner/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinPinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinPinner/subscriptions","organizations_url":"https://api.github.com/users/JustinPinner/orgs","repos_url":"https://api.github.com/users/JustinPinner/repos","events_url":"https://api.github.com/users/JustinPinner/events{/privacy}","received_events_url":"https://api.github.com/users/JustinPinner/received_events","type":"User","site_admin":false},"body":"Display contributor's byline image and name on liveblog posts if available, and if the block is properly marked with data-block-contributor, and if the feature is switched on.\r\n\r\nStyling is the same as was used for the liveblog coverage of the oscars (http://www.theguardian.com/film/filmblog/live/2015/feb/22/oscars-2015-live-red-carpet-and-arrivals-ceremony-and-winners).\r\n\r\n\r\n","created_at":"2015-04-14T14:30:00Z","updated_at":"2015-04-14T15:05:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5d3e890fbaeaf42c648bd4c7a67c8c65e26ac70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/8865/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/8865/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/8865/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/2fdce29f13f23d6e4f6d4a016c36c20c9baf2284","head":{"label":"guardian:live-blog-contributor-images","ref":"live-blog-contributor-images","sha":"2fdce29f13f23d6e4f6d4a016c36c20c9baf2284","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-04-14T15:01:00Z","pushed_at":"2015-04-14T15:01:01Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":532720,"stargazers_count":2742,"watchers_count":2742,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":251,"mirror_url":null,"open_issues_count":252,"forks":251,"open_issues":252,"watchers":2742,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"c9aacc456e44933093556fa56311937a416badda","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-04-14T15:01:00Z","pushed_at":"2015-04-14T15:01:01Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":532720,"stargazers_count":2742,"watchers_count":2742,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":251,"mirror_url":null,"open_issues_count":252,"forks":251,"open_issues":252,"watchers":2742,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8865"},"html":{"href":"https://github.com/guardian/frontend/pull/8865"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/8865"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/8865/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8865/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8865/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/2fdce29f13f23d6e4f6d4a016c36c20c9baf2284"}}}}