{"action":"closed","number":26318,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/26318","id":204023963,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDIzOTYz","html_url":"https://github.com/Automattic/wp-calypso/pull/26318","diff_url":"https://github.com/Automattic/wp-calypso/pull/26318.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/26318.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/26318","number":26318,"state":"closed","locked":false,"title":"Comments: add option to poll for new comments in the background","user":{"login":"bluefuton","id":17325,"node_id":"MDQ6VXNlcjE3MzI1","avatar_url":"https://avatars2.githubusercontent.com/u/17325?v=4","gravatar_id":"","url":"https://api.github.com/users/bluefuton","html_url":"https://github.com/bluefuton","followers_url":"https://api.github.com/users/bluefuton/followers","following_url":"https://api.github.com/users/bluefuton/following{/other_user}","gists_url":"https://api.github.com/users/bluefuton/gists{/gist_id}","starred_url":"https://api.github.com/users/bluefuton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluefuton/subscriptions","organizations_url":"https://api.github.com/users/bluefuton/orgs","repos_url":"https://api.github.com/users/bluefuton/repos","events_url":"https://api.github.com/users/bluefuton/events{/privacy}","received_events_url":"https://api.github.com/users/bluefuton/received_events","type":"User","site_admin":false},"body":"This PR adds the plumbing for loading new comments in the background. We poll every 60 seconds, and new comments are saved in Redux state. It's initially enabled on Reader full post in development mode only.\r\n\r\nA later PR will expose a UI for loading pending comments.\r\n\r\n### To test\r\n\r\nLoad a Reader full post, like:\r\n\r\nhttp://calypso.localhost:3000/read/blogs/82798297/posts/82\r\n\r\nMake a new comment (or several comments) on the original post in a separate tab:\r\n\r\nhttps://futonbleu.wordpress.com/2016/04/18/comment-test/\r\n\r\nWatch the network tab on the original page. You should see a request go to the replies endpoint every 60 seconds. The first response after you submitted your new comment(s) should contain the new comments in the response (and should not contain any earlier comments).\r\n\r\n<img width=\"997\" alt=\"screen shot 2018-08-02 at 18 04 31\" src=\"https://user-images.githubusercontent.com/17325/43565377-9aafff52-967e-11e8-97c1-a685cefaa07a.png\">\r\n\r\nIn your console, type `state.comments.pendingItems`. Ensure that the returned object contains your new comments only.\r\n\r\n<img width=\"1188\" alt=\"screen shot 2018-08-02 at 18 04 59\" src=\"https://user-images.githubusercontent.com/17325/43565384-9ec89f9a-967e-11e8-8d6b-2a324c765e8b.png\">\r\n","created_at":"2018-07-26T04:14:05Z","updated_at":"2018-08-08T20:41:34Z","closed_at":"2018-08-08T20:41:34Z","merged_at":"2018-08-08T20:41:34Z","merge_commit_sha":"f25c2b74c23cb635cc59d58ef9292352d3b96ae1","assignee":{"login":"bluefuton","id":17325,"node_id":"MDQ6VXNlcjE3MzI1","avatar_url":"https://avatars2.githubusercontent.com/u/17325?v=4","gravatar_id":"","url":"https://api.github.com/users/bluefuton","html_url":"https://github.com/bluefuton","followers_url":"https://api.github.com/users/bluefuton/followers","following_url":"https://api.github.com/users/bluefuton/following{/other_user}","gists_url":"https://api.github.com/users/bluefuton/gists{/gist_id}","starred_url":"https://api.github.com/users/bluefuton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluefuton/subscriptions","organizations_url":"https://api.github.com/users/bluefuton/orgs","repos_url":"https://api.github.com/users/bluefuton/repos","events_url":"https://api.github.com/users/bluefuton/events{/privacy}","received_events_url":"https://api.github.com/users/bluefuton/received_events","type":"User","site_admin":false},"assignees":[{"login":"bluefuton","id":17325,"node_id":"MDQ6VXNlcjE3MzI1","avatar_url":"https://avatars2.githubusercontent.com/u/17325?v=4","gravatar_id":"","url":"https://api.github.com/users/bluefuton","html_url":"https://github.com/bluefuton","followers_url":"https://api.github.com/users/bluefuton/followers","following_url":"https://api.github.com/users/bluefuton/following{/other_user}","gists_url":"https://api.github.com/users/bluefuton/gists{/gist_id}","starred_url":"https://api.github.com/users/bluefuton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluefuton/subscriptions","organizations_url":"https://api.github.com/users/bluefuton/orgs","repos_url":"https://api.github.com/users/bluefuton/repos","events_url":"https://api.github.com/users/bluefuton/events{/privacy}","received_events_url":"https://api.github.com/users/bluefuton/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"blowery","id":14350,"node_id":"MDQ6VXNlcjE0MzUw","avatar_url":"https://avatars1.githubusercontent.com/u/14350?v=4","gravatar_id":"","url":"https://api.github.com/users/blowery","html_url":"https://github.com/blowery","followers_url":"https://api.github.com/users/blowery/followers","following_url":"https://api.github.com/users/blowery/following{/other_user}","gists_url":"https://api.github.com/users/blowery/gists{/gist_id}","starred_url":"https://api.github.com/users/blowery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowery/subscriptions","organizations_url":"https://api.github.com/users/blowery/orgs","repos_url":"https://api.github.com/users/blowery/repos","events_url":"https://api.github.com/users/blowery/events{/privacy}","received_events_url":"https://api.github.com/users/blowery/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":285010024,"node_id":"MDU6TGFiZWwyODUwMTAwMjQ=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Reader","name":"Reader","color":"006b75","default":false},{"id":285010018,"node_id":"MDU6TGFiZWwyODUwMTAwMTg=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/41","html_url":"https://github.com/Automattic/wp-calypso/milestone/41","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/41/labels","id":1437663,"node_id":"MDk6TWlsZXN0b25lMTQzNzY2Mw==","number":41,"title":"Reader: Feature Backlog","description":"Reader features and enhancements that we've decided to tackle.\r\n\r\nThis is a bucket milestone, not a date driven milestone. Bugs should not be included here - they should be added to the Bug Backlog.","creator":{"login":"blowery","id":14350,"node_id":"MDQ6VXNlcjE0MzUw","avatar_url":"https://avatars1.githubusercontent.com/u/14350?v=4","gravatar_id":"","url":"https://api.github.com/users/blowery","html_url":"https://github.com/blowery","followers_url":"https://api.github.com/users/blowery/followers","following_url":"https://api.github.com/users/blowery/following{/other_user}","gists_url":"https://api.github.com/users/blowery/gists{/gist_id}","starred_url":"https://api.github.com/users/blowery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowery/subscriptions","organizations_url":"https://api.github.com/users/blowery/orgs","repos_url":"https://api.github.com/users/blowery/repos","events_url":"https://api.github.com/users/blowery/events{/privacy}","received_events_url":"https://api.github.com/users/blowery/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":60,"state":"open","created_at":"2015-12-01T15:05:13Z","updated_at":"2018-08-08T20:41:34Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/26318/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/26318/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/26318/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/ea11d51d1419f1409d0b8a2fb7faa8b92107b1de","head":{"label":"Automattic:add/reader/comment-polling","ref":"add/reader/comment-polling","sha":"ea11d51d1419f1409d0b8a2fb7faa8b92107b1de","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-08-08T19:48:52Z","pushed_at":"2018-08-08T20:41:34Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":104362,"stargazers_count":10228,"watchers_count":10228,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1447,"mirror_url":null,"archived":false,"open_issues_count":1543,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1447,"open_issues":1543,"watchers":10228,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"13c2f3b579487c245cdc800918343039c6984b51","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-08-08T19:48:52Z","pushed_at":"2018-08-08T20:41:34Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":104362,"stargazers_count":10228,"watchers_count":10228,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1447,"mirror_url":null,"archived":false,"open_issues_count":1543,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1447,"open_issues":1543,"watchers":10228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/26318"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/26318"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/26318"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/26318/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/26318/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/26318/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/ea11d51d1419f1409d0b8a2fb7faa8b92107b1de"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"bluefuton","id":17325,"node_id":"MDQ6VXNlcjE3MzI1","avatar_url":"https://avatars2.githubusercontent.com/u/17325?v=4","gravatar_id":"","url":"https://api.github.com/users/bluefuton","html_url":"https://github.com/bluefuton","followers_url":"https://api.github.com/users/bluefuton/followers","following_url":"https://api.github.com/users/bluefuton/following{/other_user}","gists_url":"https://api.github.com/users/bluefuton/gists{/gist_id}","starred_url":"https://api.github.com/users/bluefuton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluefuton/subscriptions","organizations_url":"https://api.github.com/users/bluefuton/orgs","repos_url":"https://api.github.com/users/bluefuton/repos","events_url":"https://api.github.com/users/bluefuton/events{/privacy}","received_events_url":"https://api.github.com/users/bluefuton/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":12,"additions":303,"deletions":33,"changed_files":14}}
{"actor":{"display_login":"bluefuton"}}