{"action":"created","comment":{"url":"https://api.github.com/repos/y0913/chat-space/pulls/comments/237346762","pull_request_review_id":179620538,"id":237346762,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzM0Njc2Mg==","diff_hunk":"@@ -41,10 +41,53 @@ $(function(){\n \t\t\tscroll()\n \t\t})\n \t\t.fail(function(){\n-\t\t\talert('error');\n+\t\t\talert('メッセージを入力してください');\n \t\t})\n \t\t.always(function(){\n \t\t\t$('.form__submit').prop('disabled', false);\n \t\t})\n \t})\n+\n+\t//自動更新\n+\t$(function(){\n+\t\t$(function(){\n+\t\t\tif(location.href.match(/\\/groups\\/\\d+\\/messages/)){\n+\t\t\t\tsetInterval(update, 5000);\n+\t\t\t}\n+\t\t});\n+\t\tfunction update(){\n+\t\t\tif($('.main-content__message-chat')[0]){\n+\t\t\t\tvar message_id = $('.main-content__message-chat:last').data('message-id');\n+\t\t\t\tconsole.log(message_id)\n+\t\t\t}else{\n+\t\t\t\treturn false\n+\t\t\t}\n+\t\t\t\tconsole.log(111111)\n+\t\t\t$.ajax({\n+\t\t\t\turl: location.href,\n+\t\t\t\ttype: 'GET',\n+\t\t\t\tdata: {\n+\t\t\t\tmessage: {id: message_id}\n+\t\t\t\t},\n+\t\t\t\tdataType:'json'\n+\t\t\t})\n+\t\t\t.done(function(data){\n+\t\t\t\t// if (data.length){\n+\t\t\t\t// $.each(data, function(i, data){\n+\t\t\t\t// \tvar html = buildHTML(data);\n+\t\t\t\t// \t$('.main-content__message').append(html)\n+\t\t\t\t// })\n+\t\t\t\t// }\n+\t\t\t    ","path":"app/assets/javascripts/comments.js","position":60,"original_position":60,"commit_id":"a97ecbf32840df4b06671371f45aa3a94324a637","original_commit_id":"a97ecbf32840df4b06671371f45aa3a94324a637","user":{"login":"yutakatahira","id":22128119,"node_id":"MDQ6VXNlcjIyMTI4MTE5","avatar_url":"https://avatars3.githubusercontent.com/u/22128119?v=4","gravatar_id":"","url":"https://api.github.com/users/yutakatahira","html_url":"https://github.com/yutakatahira","followers_url":"https://api.github.com/users/yutakatahira/followers","following_url":"https://api.github.com/users/yutakatahira/following{/other_user}","gists_url":"https://api.github.com/users/yutakatahira/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakatahira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakatahira/subscriptions","organizations_url":"https://api.github.com/users/yutakatahira/orgs","repos_url":"https://api.github.com/users/yutakatahira/repos","events_url":"https://api.github.com/users/yutakatahira/events{/privacy}","received_events_url":"https://api.github.com/users/yutakatahira/received_events","type":"User","site_admin":false},"body":"不要であれば、こちらのコメントアウトも消しましょう","created_at":"2018-11-29T04:01:29Z","updated_at":"2018-11-29T04:04:18Z","html_url":"https://github.com/y0913/chat-space/pull/7#discussion_r237346762","pull_request_url":"https://api.github.com/repos/y0913/chat-space/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/y0913/chat-space/pulls/comments/237346762"},"html":{"href":"https://github.com/y0913/chat-space/pull/7#discussion_r237346762"},"pull_request":{"href":"https://api.github.com/repos/y0913/chat-space/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/y0913/chat-space/pulls/7","id":234500716,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NTAwNzE2","html_url":"https://github.com/y0913/chat-space/pull/7","diff_url":"https://github.com/y0913/chat-space/pull/7.diff","patch_url":"https://github.com/y0913/chat-space/pull/7.patch","issue_url":"https://api.github.com/repos/y0913/chat-space/issues/7","number":7,"state":"open","locked":false,"title":"自動更新機能の実装","user":{"login":"y0913","id":44940979,"node_id":"MDQ6VXNlcjQ0OTQwOTc5","avatar_url":"https://avatars1.githubusercontent.com/u/44940979?v=4","gravatar_id":"","url":"https://api.github.com/users/y0913","html_url":"https://github.com/y0913","followers_url":"https://api.github.com/users/y0913/followers","following_url":"https://api.github.com/users/y0913/following{/other_user}","gists_url":"https://api.github.com/users/y0913/gists{/gist_id}","starred_url":"https://api.github.com/users/y0913/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y0913/subscriptions","organizations_url":"https://api.github.com/users/y0913/orgs","repos_url":"https://api.github.com/users/y0913/repos","events_url":"https://api.github.com/users/y0913/events{/privacy}","received_events_url":"https://api.github.com/users/y0913/received_events","type":"User","site_admin":false},"body":"Chat-spaceに自動更新機能を実装しました。","created_at":"2018-11-29T03:52:08Z","updated_at":"2018-11-29T04:04:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6c403888c15d873569c35ab066a22c9bf4f102b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/y0913/chat-space/pulls/7/commits","review_comments_url":"https://api.github.com/repos/y0913/chat-space/pulls/7/comments","review_comment_url":"https://api.github.com/repos/y0913/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/y0913/chat-space/issues/7/comments","statuses_url":"https://api.github.com/repos/y0913/chat-space/statuses/a97ecbf32840df4b06671371f45aa3a94324a637","head":{"label":"y0913:自動更新機能の実装","ref":"自動更新機能の実装","sha":"a97ecbf32840df4b06671371f45aa3a94324a637","user":{"login":"y0913","id":44940979,"node_id":"MDQ6VXNlcjQ0OTQwOTc5","avatar_url":"https://avatars1.githubusercontent.com/u/44940979?v=4","gravatar_id":"","url":"https://api.github.com/users/y0913","html_url":"https://github.com/y0913","followers_url":"https://api.github.com/users/y0913/followers","following_url":"https://api.github.com/users/y0913/following{/other_user}","gists_url":"https://api.github.com/users/y0913/gists{/gist_id}","starred_url":"https://api.github.com/users/y0913/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y0913/subscriptions","organizations_url":"https://api.github.com/users/y0913/orgs","repos_url":"https://api.github.com/users/y0913/repos","events_url":"https://api.github.com/users/y0913/events{/privacy}","received_events_url":"https://api.github.com/users/y0913/received_events","type":"User","site_admin":false},"repo":{"id":157374716,"node_id":"MDEwOlJlcG9zaXRvcnkxNTczNzQ3MTY=","name":"chat-space","full_name":"y0913/chat-space","private":false,"owner":{"login":"y0913","id":44940979,"node_id":"MDQ6VXNlcjQ0OTQwOTc5","avatar_url":"https://avatars1.githubusercontent.com/u/44940979?v=4","gravatar_id":"","url":"https://api.github.com/users/y0913","html_url":"https://github.com/y0913","followers_url":"https://api.github.com/users/y0913/followers","following_url":"https://api.github.com/users/y0913/following{/other_user}","gists_url":"https://api.github.com/users/y0913/gists{/gist_id}","starred_url":"https://api.github.com/users/y0913/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y0913/subscriptions","organizations_url":"https://api.github.com/users/y0913/orgs","repos_url":"https://api.github.com/users/y0913/repos","events_url":"https://api.github.com/users/y0913/events{/privacy}","received_events_url":"https://api.github.com/users/y0913/received_events","type":"User","site_admin":false},"html_url":"https://github.com/y0913/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/y0913/chat-space","forks_url":"https://api.github.com/repos/y0913/chat-space/forks","keys_url":"https://api.github.com/repos/y0913/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/y0913/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/y0913/chat-space/teams","hooks_url":"https://api.github.com/repos/y0913/chat-space/hooks","issue_events_url":"https://api.github.com/repos/y0913/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/y0913/chat-space/events","assignees_url":"https://api.github.com/repos/y0913/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/y0913/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/y0913/chat-space/tags","blobs_url":"https://api.github.com/repos/y0913/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/y0913/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/y0913/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/y0913/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/y0913/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/y0913/chat-space/languages","stargazers_url":"https://api.github.com/repos/y0913/chat-space/stargazers","contributors_url":"https://api.github.com/repos/y0913/chat-space/contributors","subscribers_url":"https://api.github.com/repos/y0913/chat-space/subscribers","subscription_url":"https://api.github.com/repos/y0913/chat-space/subscription","commits_url":"https://api.github.com/repos/y0913/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/y0913/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/y0913/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/y0913/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/y0913/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/y0913/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/y0913/chat-space/merges","archive_url":"https://api.github.com/repos/y0913/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/y0913/chat-space/downloads","issues_url":"https://api.github.com/repos/y0913/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/y0913/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/y0913/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/y0913/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/y0913/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/y0913/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/y0913/chat-space/deployments","created_at":"2018-11-13T12:12:17Z","updated_at":"2018-11-27T07:43:25Z","pushed_at":"2018-11-29T03:52:09Z","git_url":"git://github.com/y0913/chat-space.git","ssh_url":"git@github.com:y0913/chat-space.git","clone_url":"https://github.com/y0913/chat-space.git","svn_url":"https://github.com/y0913/chat-space","homepage":null,"size":82,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"y0913:master","ref":"master","sha":"8eb3793c1bd11e89b1e39ad6a2e6dfef6c1d78a5","user":{"login":"y0913","id":44940979,"node_id":"MDQ6VXNlcjQ0OTQwOTc5","avatar_url":"https://avatars1.githubusercontent.com/u/44940979?v=4","gravatar_id":"","url":"https://api.github.com/users/y0913","html_url":"https://github.com/y0913","followers_url":"https://api.github.com/users/y0913/followers","following_url":"https://api.github.com/users/y0913/following{/other_user}","gists_url":"https://api.github.com/users/y0913/gists{/gist_id}","starred_url":"https://api.github.com/users/y0913/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y0913/subscriptions","organizations_url":"https://api.github.com/users/y0913/orgs","repos_url":"https://api.github.com/users/y0913/repos","events_url":"https://api.github.com/users/y0913/events{/privacy}","received_events_url":"https://api.github.com/users/y0913/received_events","type":"User","site_admin":false},"repo":{"id":157374716,"node_id":"MDEwOlJlcG9zaXRvcnkxNTczNzQ3MTY=","name":"chat-space","full_name":"y0913/chat-space","private":false,"owner":{"login":"y0913","id":44940979,"node_id":"MDQ6VXNlcjQ0OTQwOTc5","avatar_url":"https://avatars1.githubusercontent.com/u/44940979?v=4","gravatar_id":"","url":"https://api.github.com/users/y0913","html_url":"https://github.com/y0913","followers_url":"https://api.github.com/users/y0913/followers","following_url":"https://api.github.com/users/y0913/following{/other_user}","gists_url":"https://api.github.com/users/y0913/gists{/gist_id}","starred_url":"https://api.github.com/users/y0913/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y0913/subscriptions","organizations_url":"https://api.github.com/users/y0913/orgs","repos_url":"https://api.github.com/users/y0913/repos","events_url":"https://api.github.com/users/y0913/events{/privacy}","received_events_url":"https://api.github.com/users/y0913/received_events","type":"User","site_admin":false},"html_url":"https://github.com/y0913/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/y0913/chat-space","forks_url":"https://api.github.com/repos/y0913/chat-space/forks","keys_url":"https://api.github.com/repos/y0913/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/y0913/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/y0913/chat-space/teams","hooks_url":"https://api.github.com/repos/y0913/chat-space/hooks","issue_events_url":"https://api.github.com/repos/y0913/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/y0913/chat-space/events","assignees_url":"https://api.github.com/repos/y0913/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/y0913/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/y0913/chat-space/tags","blobs_url":"https://api.github.com/repos/y0913/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/y0913/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/y0913/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/y0913/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/y0913/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/y0913/chat-space/languages","stargazers_url":"https://api.github.com/repos/y0913/chat-space/stargazers","contributors_url":"https://api.github.com/repos/y0913/chat-space/contributors","subscribers_url":"https://api.github.com/repos/y0913/chat-space/subscribers","subscription_url":"https://api.github.com/repos/y0913/chat-space/subscription","commits_url":"https://api.github.com/repos/y0913/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/y0913/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/y0913/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/y0913/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/y0913/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/y0913/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/y0913/chat-space/merges","archive_url":"https://api.github.com/repos/y0913/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/y0913/chat-space/downloads","issues_url":"https://api.github.com/repos/y0913/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/y0913/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/y0913/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/y0913/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/y0913/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/y0913/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/y0913/chat-space/deployments","created_at":"2018-11-13T12:12:17Z","updated_at":"2018-11-27T07:43:25Z","pushed_at":"2018-11-29T03:52:09Z","git_url":"git://github.com/y0913/chat-space.git","ssh_url":"git@github.com:y0913/chat-space.git","clone_url":"https://github.com/y0913/chat-space.git","svn_url":"https://github.com/y0913/chat-space","homepage":null,"size":82,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/y0913/chat-space/pulls/7"},"html":{"href":"https://github.com/y0913/chat-space/pull/7"},"issue":{"href":"https://api.github.com/repos/y0913/chat-space/issues/7"},"comments":{"href":"https://api.github.com/repos/y0913/chat-space/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/y0913/chat-space/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/y0913/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/y0913/chat-space/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/y0913/chat-space/statuses/a97ecbf32840df4b06671371f45aa3a94324a637"}},"author_association":"OWNER"}}
{"actor":{"display_login":"yutakatahira"}}