{"action":"created","comment":{"url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/comments/74922607","id":74922607,"diff_hunk":"@@ -0,0 +1,14 @@\n+import {splice} from 'immutable-array-methods';\n+import getSelectionItems from './get-selection-items';\n+\n+export default (articleJson, fn) => {\n+  const items = getSelectionItems(articleJson);\n+\n+  if (!items.length) {\n+    return articleJson;\n+  }","path":"lib/replace-selection-items.js","position":9,"original_position":9,"commit_id":"bd091fb0933a31cc61f183d494d2746887107c38","original_commit_id":"bd091fb0933a31cc61f183d494d2746887107c38","user":{"login":"kesla","id":74128,"avatar_url":"https://avatars.githubusercontent.com/u/74128?v=3","gravatar_id":"","url":"https://api.github.com/users/kesla","html_url":"https://github.com/kesla","followers_url":"https://api.github.com/users/kesla/followers","following_url":"https://api.github.com/users/kesla/following{/other_user}","gists_url":"https://api.github.com/users/kesla/gists{/gist_id}","starred_url":"https://api.github.com/users/kesla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kesla/subscriptions","organizations_url":"https://api.github.com/users/kesla/orgs","repos_url":"https://api.github.com/users/kesla/repos","events_url":"https://api.github.com/users/kesla/events{/privacy}","received_events_url":"https://api.github.com/users/kesla/received_events","type":"User","site_admin":false},"body":"I'm pretty sure we handle this in `immutable-array-methods` - that doing splice w deleteCount === 0 & no items will be fine.","created_at":"2016-08-16T12:17:26Z","updated_at":"2016-08-16T12:17:26Z","html_url":"https://github.com/micnews/article-json-selection-utils/pull/2#discussion_r74922607","pull_request_url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/comments/74922607"},"html":{"href":"https://github.com/micnews/article-json-selection-utils/pull/2#discussion_r74922607"},"pull_request":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2","id":81460789,"html_url":"https://github.com/micnews/article-json-selection-utils/pull/2","diff_url":"https://github.com/micnews/article-json-selection-utils/pull/2.diff","patch_url":"https://github.com/micnews/article-json-selection-utils/pull/2.patch","issue_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/2","number":2,"state":"open","locked":false,"title":"add replaceSelectionItems","user":{"login":"ellell","id":1212640,"avatar_url":"https://avatars.githubusercontent.com/u/1212640?v=3","gravatar_id":"","url":"https://api.github.com/users/ellell","html_url":"https://github.com/ellell","followers_url":"https://api.github.com/users/ellell/followers","following_url":"https://api.github.com/users/ellell/following{/other_user}","gists_url":"https://api.github.com/users/ellell/gists{/gist_id}","starred_url":"https://api.github.com/users/ellell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ellell/subscriptions","organizations_url":"https://api.github.com/users/ellell/orgs","repos_url":"https://api.github.com/users/ellell/repos","events_url":"https://api.github.com/users/ellell/events{/privacy}","received_events_url":"https://api.github.com/users/ellell/received_events","type":"User","site_admin":false},"body":"Type: Minor\r\nReview: @kesla ","created_at":"2016-08-16T12:12:22Z","updated_at":"2016-08-16T12:17:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f34556cdd8d4928b46321aaccd3c29fb1a373a4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2/commits","review_comments_url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2/comments","review_comment_url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/2/comments","statuses_url":"https://api.github.com/repos/micnews/article-json-selection-utils/statuses/bd091fb0933a31cc61f183d494d2746887107c38","head":{"label":"micnews:replace-selection","ref":"replace-selection","sha":"bd091fb0933a31cc61f183d494d2746887107c38","user":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"repo":{"id":62043129,"name":"article-json-selection-utils","full_name":"micnews/article-json-selection-utils","owner":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micnews/article-json-selection-utils","description":null,"fork":false,"url":"https://api.github.com/repos/micnews/article-json-selection-utils","forks_url":"https://api.github.com/repos/micnews/article-json-selection-utils/forks","keys_url":"https://api.github.com/repos/micnews/article-json-selection-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micnews/article-json-selection-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micnews/article-json-selection-utils/teams","hooks_url":"https://api.github.com/repos/micnews/article-json-selection-utils/hooks","issue_events_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/events{/number}","events_url":"https://api.github.com/repos/micnews/article-json-selection-utils/events","assignees_url":"https://api.github.com/repos/micnews/article-json-selection-utils/assignees{/user}","branches_url":"https://api.github.com/repos/micnews/article-json-selection-utils/branches{/branch}","tags_url":"https://api.github.com/repos/micnews/article-json-selection-utils/tags","blobs_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micnews/article-json-selection-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/micnews/article-json-selection-utils/languages","stargazers_url":"https://api.github.com/repos/micnews/article-json-selection-utils/stargazers","contributors_url":"https://api.github.com/repos/micnews/article-json-selection-utils/contributors","subscribers_url":"https://api.github.com/repos/micnews/article-json-selection-utils/subscribers","subscription_url":"https://api.github.com/repos/micnews/article-json-selection-utils/subscription","commits_url":"https://api.github.com/repos/micnews/article-json-selection-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/micnews/article-json-selection-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/micnews/article-json-selection-utils/contents/{+path}","compare_url":"https://api.github.com/repos/micnews/article-json-selection-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micnews/article-json-selection-utils/merges","archive_url":"https://api.github.com/repos/micnews/article-json-selection-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micnews/article-json-selection-utils/downloads","issues_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues{/number}","pulls_url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/micnews/article-json-selection-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/micnews/article-json-selection-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micnews/article-json-selection-utils/labels{/name}","releases_url":"https://api.github.com/repos/micnews/article-json-selection-utils/releases{/id}","deployments_url":"https://api.github.com/repos/micnews/article-json-selection-utils/deployments","created_at":"2016-06-27T09:26:56Z","updated_at":"2016-06-29T23:21:26Z","pushed_at":"2016-08-16T12:16:12Z","git_url":"git://github.com/micnews/article-json-selection-utils.git","ssh_url":"git@github.com:micnews/article-json-selection-utils.git","clone_url":"https://github.com/micnews/article-json-selection-utils.git","svn_url":"https://github.com/micnews/article-json-selection-utils","homepage":null,"size":11,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"micnews:master","ref":"master","sha":"500953f5120ba1ec400e57b2a10baceaea54b220","user":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"repo":{"id":62043129,"name":"article-json-selection-utils","full_name":"micnews/article-json-selection-utils","owner":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micnews/article-json-selection-utils","description":null,"fork":false,"url":"https://api.github.com/repos/micnews/article-json-selection-utils","forks_url":"https://api.github.com/repos/micnews/article-json-selection-utils/forks","keys_url":"https://api.github.com/repos/micnews/article-json-selection-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micnews/article-json-selection-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micnews/article-json-selection-utils/teams","hooks_url":"https://api.github.com/repos/micnews/article-json-selection-utils/hooks","issue_events_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/events{/number}","events_url":"https://api.github.com/repos/micnews/article-json-selection-utils/events","assignees_url":"https://api.github.com/repos/micnews/article-json-selection-utils/assignees{/user}","branches_url":"https://api.github.com/repos/micnews/article-json-selection-utils/branches{/branch}","tags_url":"https://api.github.com/repos/micnews/article-json-selection-utils/tags","blobs_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micnews/article-json-selection-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/micnews/article-json-selection-utils/languages","stargazers_url":"https://api.github.com/repos/micnews/article-json-selection-utils/stargazers","contributors_url":"https://api.github.com/repos/micnews/article-json-selection-utils/contributors","subscribers_url":"https://api.github.com/repos/micnews/article-json-selection-utils/subscribers","subscription_url":"https://api.github.com/repos/micnews/article-json-selection-utils/subscription","commits_url":"https://api.github.com/repos/micnews/article-json-selection-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/micnews/article-json-selection-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/micnews/article-json-selection-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/micnews/article-json-selection-utils/contents/{+path}","compare_url":"https://api.github.com/repos/micnews/article-json-selection-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micnews/article-json-selection-utils/merges","archive_url":"https://api.github.com/repos/micnews/article-json-selection-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micnews/article-json-selection-utils/downloads","issues_url":"https://api.github.com/repos/micnews/article-json-selection-utils/issues{/number}","pulls_url":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/micnews/article-json-selection-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/micnews/article-json-selection-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micnews/article-json-selection-utils/labels{/name}","releases_url":"https://api.github.com/repos/micnews/article-json-selection-utils/releases{/id}","deployments_url":"https://api.github.com/repos/micnews/article-json-selection-utils/deployments","created_at":"2016-06-27T09:26:56Z","updated_at":"2016-06-29T23:21:26Z","pushed_at":"2016-08-16T12:16:12Z","git_url":"git://github.com/micnews/article-json-selection-utils.git","ssh_url":"git@github.com:micnews/article-json-selection-utils.git","clone_url":"https://github.com/micnews/article-json-selection-utils.git","svn_url":"https://github.com/micnews/article-json-selection-utils","homepage":null,"size":11,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2"},"html":{"href":"https://github.com/micnews/article-json-selection-utils/pull/2"},"issue":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/2"},"comments":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/micnews/article-json-selection-utils/statuses/bd091fb0933a31cc61f183d494d2746887107c38"}}}}
{"actor":{"display_login":"kesla"}}