{"action":"created","comment":{"url":"https://api.github.com/repos/Xvecess/xvecess/pulls/comments/33893104","id":33893104,"diff_hunk":"@@ -0,0 +1,31 @@\n+ready = ->\n+  pub = PrivatePub\n+  pub.subscribe \"/comments\", (data, channel) ->\n+    comment = $.parseJSON(data['comment'])\n+    commentable_id = comment.commentable_id\n+    comment_id = comment.id\n+    type = comment.commentable_type\n+\n+    li = $('<li/>', {class: 'comment-body', id: 'comment-' + comment_id}).append(\n+      $('<span>' + comment.body + '</span> <span> <a class=\"delete-comment\" data-comment-id= ' +\n+          comment_id + ' data-remote=\"true\" rel=\"nofollow\" data-method=\"delete\" href=\"/comments/' +\n+          comment_id + '\">Удалить комментарий</a></span>'))\n+\n+    if  type == 'Question'\n+      $('ul.question-comments-list').append(li)\n+    else if type == 'Answer'\n+      $('ul.answer-comments-list#' + commentable_id).append(li)\n+    $('textarea.text').val('')\n+    del_link()\n+\n+  del_link()","path":"app/assets/javascripts/comments.coffee","position":21,"original_position":21,"commit_id":"d005d7d28570e7f9ce2d08bfade7adfafd74ce58","original_commit_id":"d005d7d28570e7f9ce2d08bfade7adfafd74ce58","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"Вот этот вызов я бы перенес в самое начало функции ready, чтобы визуально отделить функцию del_link от  PrivatePub. Но это не критично абсолютно, просто для удобства чтения.","created_at":"2015-07-05T08:46:13Z","updated_at":"2015-07-05T08:46:13Z","html_url":"https://github.com/Xvecess/xvecess/pull/8#discussion_r33893104","pull_request_url":"https://api.github.com/repos/Xvecess/xvecess/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/Xvecess/xvecess/pulls/comments/33893104"},"html":{"href":"https://github.com/Xvecess/xvecess/pull/8#discussion_r33893104"},"pull_request":{"href":"https://api.github.com/repos/Xvecess/xvecess/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/Xvecess/xvecess/pulls/8","id":39053012,"html_url":"https://github.com/Xvecess/xvecess/pull/8","diff_url":"https://github.com/Xvecess/xvecess/pull/8.diff","patch_url":"https://github.com/Xvecess/xvecess/pull/8.patch","issue_url":"https://api.github.com/repos/Xvecess/xvecess/issues/8","number":8,"state":"open","locked":false,"title":"Add comments","user":{"login":"Xvecess","id":12614104,"avatar_url":"https://avatars.githubusercontent.com/u/12614104?v=3","gravatar_id":"","url":"https://api.github.com/users/Xvecess","html_url":"https://github.com/Xvecess","followers_url":"https://api.github.com/users/Xvecess/followers","following_url":"https://api.github.com/users/Xvecess/following{/other_user}","gists_url":"https://api.github.com/users/Xvecess/gists{/gist_id}","starred_url":"https://api.github.com/users/Xvecess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xvecess/subscriptions","organizations_url":"https://api.github.com/users/Xvecess/orgs","repos_url":"https://api.github.com/users/Xvecess/repos","events_url":"https://api.github.com/users/Xvecess/events{/privacy}","received_events_url":"https://api.github.com/users/Xvecess/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-02T06:55:07Z","updated_at":"2015-07-05T08:46:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52dd084a086638295855d787bdc7a1a353e1e67e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Xvecess/xvecess/pulls/8/commits","review_comments_url":"https://api.github.com/repos/Xvecess/xvecess/pulls/8/comments","review_comment_url":"https://api.github.com/repos/Xvecess/xvecess/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Xvecess/xvecess/issues/8/comments","statuses_url":"https://api.github.com/repos/Xvecess/xvecess/statuses/d005d7d28570e7f9ce2d08bfade7adfafd74ce58","head":{"label":"Xvecess:eight","ref":"eight","sha":"d005d7d28570e7f9ce2d08bfade7adfafd74ce58","user":{"login":"Xvecess","id":12614104,"avatar_url":"https://avatars.githubusercontent.com/u/12614104?v=3","gravatar_id":"","url":"https://api.github.com/users/Xvecess","html_url":"https://github.com/Xvecess","followers_url":"https://api.github.com/users/Xvecess/followers","following_url":"https://api.github.com/users/Xvecess/following{/other_user}","gists_url":"https://api.github.com/users/Xvecess/gists{/gist_id}","starred_url":"https://api.github.com/users/Xvecess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xvecess/subscriptions","organizations_url":"https://api.github.com/users/Xvecess/orgs","repos_url":"https://api.github.com/users/Xvecess/repos","events_url":"https://api.github.com/users/Xvecess/events{/privacy}","received_events_url":"https://api.github.com/users/Xvecess/received_events","type":"User","site_admin":false},"repo":{"id":36555500,"name":"xvecess","full_name":"Xvecess/xvecess","owner":{"login":"Xvecess","id":12614104,"avatar_url":"https://avatars.githubusercontent.com/u/12614104?v=3","gravatar_id":"","url":"https://api.github.com/users/Xvecess","html_url":"https://github.com/Xvecess","followers_url":"https://api.github.com/users/Xvecess/followers","following_url":"https://api.github.com/users/Xvecess/following{/other_user}","gists_url":"https://api.github.com/users/Xvecess/gists{/gist_id}","starred_url":"https://api.github.com/users/Xvecess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xvecess/subscriptions","organizations_url":"https://api.github.com/users/Xvecess/orgs","repos_url":"https://api.github.com/users/Xvecess/repos","events_url":"https://api.github.com/users/Xvecess/events{/privacy}","received_events_url":"https://api.github.com/users/Xvecess/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Xvecess/xvecess","description":"","fork":false,"url":"https://api.github.com/repos/Xvecess/xvecess","forks_url":"https://api.github.com/repos/Xvecess/xvecess/forks","keys_url":"https://api.github.com/repos/Xvecess/xvecess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Xvecess/xvecess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Xvecess/xvecess/teams","hooks_url":"https://api.github.com/repos/Xvecess/xvecess/hooks","issue_events_url":"https://api.github.com/repos/Xvecess/xvecess/issues/events{/number}","events_url":"https://api.github.com/repos/Xvecess/xvecess/events","assignees_url":"https://api.github.com/repos/Xvecess/xvecess/assignees{/user}","branches_url":"https://api.github.com/repos/Xvecess/xvecess/branches{/branch}","tags_url":"https://api.github.com/repos/Xvecess/xvecess/tags","blobs_url":"https://api.github.com/repos/Xvecess/xvecess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Xvecess/xvecess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Xvecess/xvecess/git/refs{/sha}","trees_url":"https://api.github.com/repos/Xvecess/xvecess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Xvecess/xvecess/statuses/{sha}","languages_url":"https://api.github.com/repos/Xvecess/xvecess/languages","stargazers_url":"https://api.github.com/repos/Xvecess/xvecess/stargazers","contributors_url":"https://api.github.com/repos/Xvecess/xvecess/contributors","subscribers_url":"https://api.github.com/repos/Xvecess/xvecess/subscribers","subscription_url":"https://api.github.com/repos/Xvecess/xvecess/subscription","commits_url":"https://api.github.com/repos/Xvecess/xvecess/commits{/sha}","git_commits_url":"https://api.github.com/repos/Xvecess/xvecess/git/commits{/sha}","comments_url":"https://api.github.com/repos/Xvecess/xvecess/comments{/number}","issue_comment_url":"https://api.github.com/repos/Xvecess/xvecess/issues/comments{/number}","contents_url":"https://api.github.com/repos/Xvecess/xvecess/contents/{+path}","compare_url":"https://api.github.com/repos/Xvecess/xvecess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Xvecess/xvecess/merges","archive_url":"https://api.github.com/repos/Xvecess/xvecess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Xvecess/xvecess/downloads","issues_url":"https://api.github.com/repos/Xvecess/xvecess/issues{/number}","pulls_url":"https://api.github.com/repos/Xvecess/xvecess/pulls{/number}","milestones_url":"https://api.github.com/repos/Xvecess/xvecess/milestones{/number}","notifications_url":"https://api.github.com/repos/Xvecess/xvecess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Xvecess/xvecess/labels{/name}","releases_url":"https://api.github.com/repos/Xvecess/xvecess/releases{/id}","created_at":"2015-05-30T11:32:10Z","updated_at":"2015-06-25T09:11:49Z","pushed_at":"2015-07-04T14:52:06Z","git_url":"git://github.com/Xvecess/xvecess.git","ssh_url":"git@github.com:Xvecess/xvecess.git","clone_url":"https://github.com/Xvecess/xvecess.git","svn_url":"https://github.com/Xvecess/xvecess","homepage":null,"size":756,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"Xvecess:master","ref":"master","sha":"2084bd335ff76084aeae1eb747513dd11875d119","user":{"login":"Xvecess","id":12614104,"avatar_url":"https://avatars.githubusercontent.com/u/12614104?v=3","gravatar_id":"","url":"https://api.github.com/users/Xvecess","html_url":"https://github.com/Xvecess","followers_url":"https://api.github.com/users/Xvecess/followers","following_url":"https://api.github.com/users/Xvecess/following{/other_user}","gists_url":"https://api.github.com/users/Xvecess/gists{/gist_id}","starred_url":"https://api.github.com/users/Xvecess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xvecess/subscriptions","organizations_url":"https://api.github.com/users/Xvecess/orgs","repos_url":"https://api.github.com/users/Xvecess/repos","events_url":"https://api.github.com/users/Xvecess/events{/privacy}","received_events_url":"https://api.github.com/users/Xvecess/received_events","type":"User","site_admin":false},"repo":{"id":36555500,"name":"xvecess","full_name":"Xvecess/xvecess","owner":{"login":"Xvecess","id":12614104,"avatar_url":"https://avatars.githubusercontent.com/u/12614104?v=3","gravatar_id":"","url":"https://api.github.com/users/Xvecess","html_url":"https://github.com/Xvecess","followers_url":"https://api.github.com/users/Xvecess/followers","following_url":"https://api.github.com/users/Xvecess/following{/other_user}","gists_url":"https://api.github.com/users/Xvecess/gists{/gist_id}","starred_url":"https://api.github.com/users/Xvecess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xvecess/subscriptions","organizations_url":"https://api.github.com/users/Xvecess/orgs","repos_url":"https://api.github.com/users/Xvecess/repos","events_url":"https://api.github.com/users/Xvecess/events{/privacy}","received_events_url":"https://api.github.com/users/Xvecess/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Xvecess/xvecess","description":"","fork":false,"url":"https://api.github.com/repos/Xvecess/xvecess","forks_url":"https://api.github.com/repos/Xvecess/xvecess/forks","keys_url":"https://api.github.com/repos/Xvecess/xvecess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Xvecess/xvecess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Xvecess/xvecess/teams","hooks_url":"https://api.github.com/repos/Xvecess/xvecess/hooks","issue_events_url":"https://api.github.com/repos/Xvecess/xvecess/issues/events{/number}","events_url":"https://api.github.com/repos/Xvecess/xvecess/events","assignees_url":"https://api.github.com/repos/Xvecess/xvecess/assignees{/user}","branches_url":"https://api.github.com/repos/Xvecess/xvecess/branches{/branch}","tags_url":"https://api.github.com/repos/Xvecess/xvecess/tags","blobs_url":"https://api.github.com/repos/Xvecess/xvecess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Xvecess/xvecess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Xvecess/xvecess/git/refs{/sha}","trees_url":"https://api.github.com/repos/Xvecess/xvecess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Xvecess/xvecess/statuses/{sha}","languages_url":"https://api.github.com/repos/Xvecess/xvecess/languages","stargazers_url":"https://api.github.com/repos/Xvecess/xvecess/stargazers","contributors_url":"https://api.github.com/repos/Xvecess/xvecess/contributors","subscribers_url":"https://api.github.com/repos/Xvecess/xvecess/subscribers","subscription_url":"https://api.github.com/repos/Xvecess/xvecess/subscription","commits_url":"https://api.github.com/repos/Xvecess/xvecess/commits{/sha}","git_commits_url":"https://api.github.com/repos/Xvecess/xvecess/git/commits{/sha}","comments_url":"https://api.github.com/repos/Xvecess/xvecess/comments{/number}","issue_comment_url":"https://api.github.com/repos/Xvecess/xvecess/issues/comments{/number}","contents_url":"https://api.github.com/repos/Xvecess/xvecess/contents/{+path}","compare_url":"https://api.github.com/repos/Xvecess/xvecess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Xvecess/xvecess/merges","archive_url":"https://api.github.com/repos/Xvecess/xvecess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Xvecess/xvecess/downloads","issues_url":"https://api.github.com/repos/Xvecess/xvecess/issues{/number}","pulls_url":"https://api.github.com/repos/Xvecess/xvecess/pulls{/number}","milestones_url":"https://api.github.com/repos/Xvecess/xvecess/milestones{/number}","notifications_url":"https://api.github.com/repos/Xvecess/xvecess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Xvecess/xvecess/labels{/name}","releases_url":"https://api.github.com/repos/Xvecess/xvecess/releases{/id}","created_at":"2015-05-30T11:32:10Z","updated_at":"2015-06-25T09:11:49Z","pushed_at":"2015-07-04T14:52:06Z","git_url":"git://github.com/Xvecess/xvecess.git","ssh_url":"git@github.com:Xvecess/xvecess.git","clone_url":"https://github.com/Xvecess/xvecess.git","svn_url":"https://github.com/Xvecess/xvecess","homepage":null,"size":756,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Xvecess/xvecess/pulls/8"},"html":{"href":"https://github.com/Xvecess/xvecess/pull/8"},"issue":{"href":"https://api.github.com/repos/Xvecess/xvecess/issues/8"},"comments":{"href":"https://api.github.com/repos/Xvecess/xvecess/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/Xvecess/xvecess/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/Xvecess/xvecess/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Xvecess/xvecess/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/Xvecess/xvecess/statuses/d005d7d28570e7f9ce2d08bfade7adfafd74ce58"}}}}