{"action":"created","comment":{"url":"https://api.github.com/repos/rockbook1105/chat-space/pulls/comments/201299876","pull_request_review_id":135770888,"id":201299876,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTI5OTg3Ng==","diff_hunk":"@@ -0,0 +1,60 @@\n+$(function() {\n+\n+  function appendSearchUser(user){\n+    var html = `<div class=\"chat-group-user clearfix id='chat-group-user-${ user.id }'\">\n+                  <p class=\"chat-group-user__name\">${ user.name }</p>\n+                  <a class=\"user-search-add chat-group-user__btn js-search-add id='chat-group-user__btn--add'\" data-user-id=${ user.id } data-user-name=${ user.name }>追加</a>\n+                </div>`\n+     $('#user-search-result').append(html);\n+  }\n+\n+  function addUser(id,name) {\n+    var html = `<div class='chat-group-user clearfix' id='chat-group-user-${ id }'>\n+                <input name='group[user_ids][]' type='hidden' value='${ id }'>\n+                <p class='chat-group-user__name'>${ name }</p>\n+                <a class='user-search-remove chat-group-user__btn chat-group-user__btn--remove js-remove-btn data-user-id=\"${ id }\" data-user-name=\"${ name }\"'>削除</a>\n+              </div>`\n+    $(\"#chat-group-users\").append(html)\n+  }\n+\n+  $(\"#user-search-field\").on(\"keyup\", function(e) {\n+    e.preventDefault()\n+    var input = $(\"#user-search-field\").val();\n+    var newInputs = input.split(\" \").filter(function(e){return e;});\n+    var searchElements = newInputs.join(\"|\");\n+    console.log(searchElements)\n+      $.ajax({\n+        type: 'GET',\n+        url: '/users',\n+        data: { keyword: searchElements },\n+        dataType: 'json'\n+      })\n+      .done(function(users){\n+        if(input.length != 0){\n+          $.each(users, function(i, user){\n+            if(searchElements.length < 2){","path":"app/assets/javascripts/user.js","position":35,"original_position":35,"commit_id":"9636b9423c63391549c71bdaf9d468623fbf23a5","original_commit_id":"9636b9423c63391549c71bdaf9d468623fbf23a5","user":{"login":"MrUrakou","id":18899359,"node_id":"MDQ6VXNlcjE4ODk5MzU5","avatar_url":"https://avatars1.githubusercontent.com/u/18899359?v=4","gravatar_id":"","url":"https://api.github.com/users/MrUrakou","html_url":"https://github.com/MrUrakou","followers_url":"https://api.github.com/users/MrUrakou/followers","following_url":"https://api.github.com/users/MrUrakou/following{/other_user}","gists_url":"https://api.github.com/users/MrUrakou/gists{/gist_id}","starred_url":"https://api.github.com/users/MrUrakou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrUrakou/subscriptions","organizations_url":"https://api.github.com/users/MrUrakou/orgs","repos_url":"https://api.github.com/users/MrUrakou/repos","events_url":"https://api.github.com/users/MrUrakou/events{/privacy}","received_events_url":"https://api.github.com/users/MrUrakou/received_events","type":"User","site_admin":false},"body":"この記述、どのような挙動を期待してますか？","created_at":"2018-07-10T10:56:21Z","updated_at":"2018-07-10T10:57:54Z","html_url":"https://github.com/rockbook1105/chat-space/pull/11#discussion_r201299876","pull_request_url":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rockbook1105/chat-space/pulls/comments/201299876"},"html":{"href":"https://github.com/rockbook1105/chat-space/pull/11#discussion_r201299876"},"pull_request":{"href":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11","id":198513491,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NTEzNDkx","html_url":"https://github.com/rockbook1105/chat-space/pull/11","diff_url":"https://github.com/rockbook1105/chat-space/pull/11.diff","patch_url":"https://github.com/rockbook1105/chat-space/pull/11.patch","issue_url":"https://api.github.com/repos/rockbook1105/chat-space/issues/11","number":11,"state":"open","locked":false,"title":"Incremental search implementation","user":{"login":"rockbook1105","id":34837877,"node_id":"MDQ6VXNlcjM0ODM3ODc3","avatar_url":"https://avatars1.githubusercontent.com/u/34837877?v=4","gravatar_id":"","url":"https://api.github.com/users/rockbook1105","html_url":"https://github.com/rockbook1105","followers_url":"https://api.github.com/users/rockbook1105/followers","following_url":"https://api.github.com/users/rockbook1105/following{/other_user}","gists_url":"https://api.github.com/users/rockbook1105/gists{/gist_id}","starred_url":"https://api.github.com/users/rockbook1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockbook1105/subscriptions","organizations_url":"https://api.github.com/users/rockbook1105/orgs","repos_url":"https://api.github.com/users/rockbook1105/repos","events_url":"https://api.github.com/users/rockbook1105/events{/privacy}","received_events_url":"https://api.github.com/users/rockbook1105/received_events","type":"User","site_admin":false},"body":"#What\nインクリメンタルサーチ\n#Why\nユーザー追加、削除を容易に行えるようにするため","created_at":"2018-07-01T08:26:41Z","updated_at":"2018-07-10T10:57:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb110929e2b196981b79fa2f02a10ecdbd528b02","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11/commits","review_comments_url":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11/comments","review_comment_url":"https://api.github.com/repos/rockbook1105/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rockbook1105/chat-space/issues/11/comments","statuses_url":"https://api.github.com/repos/rockbook1105/chat-space/statuses/9636b9423c63391549c71bdaf9d468623fbf23a5","head":{"label":"rockbook1105:incremental-search-implementation","ref":"incremental-search-implementation","sha":"9636b9423c63391549c71bdaf9d468623fbf23a5","user":{"login":"rockbook1105","id":34837877,"node_id":"MDQ6VXNlcjM0ODM3ODc3","avatar_url":"https://avatars1.githubusercontent.com/u/34837877?v=4","gravatar_id":"","url":"https://api.github.com/users/rockbook1105","html_url":"https://github.com/rockbook1105","followers_url":"https://api.github.com/users/rockbook1105/followers","following_url":"https://api.github.com/users/rockbook1105/following{/other_user}","gists_url":"https://api.github.com/users/rockbook1105/gists{/gist_id}","starred_url":"https://api.github.com/users/rockbook1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockbook1105/subscriptions","organizations_url":"https://api.github.com/users/rockbook1105/orgs","repos_url":"https://api.github.com/users/rockbook1105/repos","events_url":"https://api.github.com/users/rockbook1105/events{/privacy}","received_events_url":"https://api.github.com/users/rockbook1105/received_events","type":"User","site_admin":false},"repo":{"id":128175235,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgxNzUyMzU=","name":"chat-space","full_name":"rockbook1105/chat-space","owner":{"login":"rockbook1105","id":34837877,"node_id":"MDQ6VXNlcjM0ODM3ODc3","avatar_url":"https://avatars1.githubusercontent.com/u/34837877?v=4","gravatar_id":"","url":"https://api.github.com/users/rockbook1105","html_url":"https://github.com/rockbook1105","followers_url":"https://api.github.com/users/rockbook1105/followers","following_url":"https://api.github.com/users/rockbook1105/following{/other_user}","gists_url":"https://api.github.com/users/rockbook1105/gists{/gist_id}","starred_url":"https://api.github.com/users/rockbook1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockbook1105/subscriptions","organizations_url":"https://api.github.com/users/rockbook1105/orgs","repos_url":"https://api.github.com/users/rockbook1105/repos","events_url":"https://api.github.com/users/rockbook1105/events{/privacy}","received_events_url":"https://api.github.com/users/rockbook1105/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rockbook1105/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/rockbook1105/chat-space","forks_url":"https://api.github.com/repos/rockbook1105/chat-space/forks","keys_url":"https://api.github.com/repos/rockbook1105/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rockbook1105/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rockbook1105/chat-space/teams","hooks_url":"https://api.github.com/repos/rockbook1105/chat-space/hooks","issue_events_url":"https://api.github.com/repos/rockbook1105/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/rockbook1105/chat-space/events","assignees_url":"https://api.github.com/repos/rockbook1105/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/rockbook1105/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/rockbook1105/chat-space/tags","blobs_url":"https://api.github.com/repos/rockbook1105/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rockbook1105/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rockbook1105/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/rockbook1105/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rockbook1105/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/rockbook1105/chat-space/languages","stargazers_url":"https://api.github.com/repos/rockbook1105/chat-space/stargazers","contributors_url":"https://api.github.com/repos/rockbook1105/chat-space/contributors","subscribers_url":"https://api.github.com/repos/rockbook1105/chat-space/subscribers","subscription_url":"https://api.github.com/repos/rockbook1105/chat-space/subscription","commits_url":"https://api.github.com/repos/rockbook1105/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/rockbook1105/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/rockbook1105/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/rockbook1105/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/rockbook1105/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/rockbook1105/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rockbook1105/chat-space/merges","archive_url":"https://api.github.com/repos/rockbook1105/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rockbook1105/chat-space/downloads","issues_url":"https://api.github.com/repos/rockbook1105/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/rockbook1105/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/rockbook1105/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/rockbook1105/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rockbook1105/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/rockbook1105/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/rockbook1105/chat-space/deployments","created_at":"2018-04-05T07:53:28Z","updated_at":"2018-06-30T09:22:47Z","pushed_at":"2018-07-10T10:45:30Z","git_url":"git://github.com/rockbook1105/chat-space.git","ssh_url":"git@github.com:rockbook1105/chat-space.git","clone_url":"https://github.com/rockbook1105/chat-space.git","svn_url":"https://github.com/rockbook1105/chat-space","homepage":null,"size":4163,"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":"rockbook1105:master","ref":"master","sha":"c30af28d21290d943412d839810d05acc444ee1f","user":{"login":"rockbook1105","id":34837877,"node_id":"MDQ6VXNlcjM0ODM3ODc3","avatar_url":"https://avatars1.githubusercontent.com/u/34837877?v=4","gravatar_id":"","url":"https://api.github.com/users/rockbook1105","html_url":"https://github.com/rockbook1105","followers_url":"https://api.github.com/users/rockbook1105/followers","following_url":"https://api.github.com/users/rockbook1105/following{/other_user}","gists_url":"https://api.github.com/users/rockbook1105/gists{/gist_id}","starred_url":"https://api.github.com/users/rockbook1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockbook1105/subscriptions","organizations_url":"https://api.github.com/users/rockbook1105/orgs","repos_url":"https://api.github.com/users/rockbook1105/repos","events_url":"https://api.github.com/users/rockbook1105/events{/privacy}","received_events_url":"https://api.github.com/users/rockbook1105/received_events","type":"User","site_admin":false},"repo":{"id":128175235,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgxNzUyMzU=","name":"chat-space","full_name":"rockbook1105/chat-space","owner":{"login":"rockbook1105","id":34837877,"node_id":"MDQ6VXNlcjM0ODM3ODc3","avatar_url":"https://avatars1.githubusercontent.com/u/34837877?v=4","gravatar_id":"","url":"https://api.github.com/users/rockbook1105","html_url":"https://github.com/rockbook1105","followers_url":"https://api.github.com/users/rockbook1105/followers","following_url":"https://api.github.com/users/rockbook1105/following{/other_user}","gists_url":"https://api.github.com/users/rockbook1105/gists{/gist_id}","starred_url":"https://api.github.com/users/rockbook1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockbook1105/subscriptions","organizations_url":"https://api.github.com/users/rockbook1105/orgs","repos_url":"https://api.github.com/users/rockbook1105/repos","events_url":"https://api.github.com/users/rockbook1105/events{/privacy}","received_events_url":"https://api.github.com/users/rockbook1105/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rockbook1105/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/rockbook1105/chat-space","forks_url":"https://api.github.com/repos/rockbook1105/chat-space/forks","keys_url":"https://api.github.com/repos/rockbook1105/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rockbook1105/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rockbook1105/chat-space/teams","hooks_url":"https://api.github.com/repos/rockbook1105/chat-space/hooks","issue_events_url":"https://api.github.com/repos/rockbook1105/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/rockbook1105/chat-space/events","assignees_url":"https://api.github.com/repos/rockbook1105/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/rockbook1105/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/rockbook1105/chat-space/tags","blobs_url":"https://api.github.com/repos/rockbook1105/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rockbook1105/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rockbook1105/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/rockbook1105/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rockbook1105/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/rockbook1105/chat-space/languages","stargazers_url":"https://api.github.com/repos/rockbook1105/chat-space/stargazers","contributors_url":"https://api.github.com/repos/rockbook1105/chat-space/contributors","subscribers_url":"https://api.github.com/repos/rockbook1105/chat-space/subscribers","subscription_url":"https://api.github.com/repos/rockbook1105/chat-space/subscription","commits_url":"https://api.github.com/repos/rockbook1105/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/rockbook1105/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/rockbook1105/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/rockbook1105/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/rockbook1105/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/rockbook1105/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rockbook1105/chat-space/merges","archive_url":"https://api.github.com/repos/rockbook1105/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rockbook1105/chat-space/downloads","issues_url":"https://api.github.com/repos/rockbook1105/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/rockbook1105/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/rockbook1105/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/rockbook1105/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rockbook1105/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/rockbook1105/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/rockbook1105/chat-space/deployments","created_at":"2018-04-05T07:53:28Z","updated_at":"2018-06-30T09:22:47Z","pushed_at":"2018-07-10T10:45:30Z","git_url":"git://github.com/rockbook1105/chat-space.git","ssh_url":"git@github.com:rockbook1105/chat-space.git","clone_url":"https://github.com/rockbook1105/chat-space.git","svn_url":"https://github.com/rockbook1105/chat-space","homepage":null,"size":4163,"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/rockbook1105/chat-space/pulls/11"},"html":{"href":"https://github.com/rockbook1105/chat-space/pull/11"},"issue":{"href":"https://api.github.com/repos/rockbook1105/chat-space/issues/11"},"comments":{"href":"https://api.github.com/repos/rockbook1105/chat-space/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/rockbook1105/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rockbook1105/chat-space/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/rockbook1105/chat-space/statuses/9636b9423c63391549c71bdaf9d468623fbf23a5"}},"author_association":"OWNER"}}
{"actor":{"display_login":"MrUrakou"}}