{"action":"created","comment":{"url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments/46260693","id":46260693,"diff_hunk":"@@ -0,0 +1,33 @@\n+$(function() {\n+  var pusherKey = $(\"#user\").data(\"pusher-key\");\n+  var pusher = new Pusher(pusherKey);\n+  var env = $(\"#user\").data(\"environment\");\n+  var userId = $(\"#user\").data(\"user-id\");\n+  var channel = pusher.subscribe(\"bg-job-\" + env + \"-notifier-\" + userId);\n+\n+  notify = function(data) {\n+    if (data.type == \"success\") {\n+      var type = \"success\";\n+      var message = data.message + \" from <i>\" +\n+                    data.url + \"</i>. Check them \" +\n+                    \"<strong><a href='/blocks/\" +\n+                    data.block_id + \"'>here</a></strong>\";\n+    } else{\n+      var type = \"danger\";\n+      var message = \"Sorry, we got error for cards adding task: \" +\n+                    data.message;\n+    };\n+    var html = '<div class=\"col-sm-12\"><div class=\"alert alert-dismissible' +\n+               ' alert-' + type + '\" ' + 'role=\"alert\">' +\n+               '<button type=\"button\" class=\"close\" data-dismiss=\"alert\"' +\n+               ' aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span>' +\n+               '</button><p id=\"alert\">' + message + '</p></div></div>'\n+    var notification = $(html);\n+    notification.appendTo($(\"#notice_block\")).hide();\n+    notification.slideDown();\n+  }\n+\n+  channel.bind(\"job_finished\", function(data) {\n+    notify(data);","path":"app/assets/javascripts/dashboard/pusher/pusher.js","position":31,"original_position":31,"commit_id":"bce9336f1f046a3a8174d17a445ed4a3e0c3d8a0","original_commit_id":"bce9336f1f046a3a8174d17a445ed4a3e0c3d8a0","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'notify' is not defined.","created_at":"2015-12-01T10:15:59Z","updated_at":"2015-12-01T10:15:59Z","html_url":"https://github.com/ArmadilloXX/flashcards/pull/10#discussion_r46260693","pull_request_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments/46260693"},"html":{"href":"https://github.com/ArmadilloXX/flashcards/pull/10#discussion_r46260693"},"pull_request":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10","id":51789425,"html_url":"https://github.com/ArmadilloXX/flashcards/pull/10","diff_url":"https://github.com/ArmadilloXX/flashcards/pull/10.diff","patch_url":"https://github.com/ArmadilloXX/flashcards/pull/10.patch","issue_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/10","number":10,"state":"open","locked":false,"title":"Seventh task","user":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-25T12:42:59Z","updated_at":"2015-12-01T10:15:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"850a03eb1ff63dd53f9732cb82956ebb9c170bed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10/commits","review_comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10/comments","review_comment_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/10/comments","statuses_url":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/bce9336f1f046a3a8174d17a445ed4a3e0c3d8a0","head":{"label":"ArmadilloXX:seventh_task","ref":"seventh_task","sha":"bce9336f1f046a3a8174d17a445ed4a3e0c3d8a0","user":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"repo":{"id":42848111,"name":"flashcards","full_name":"ArmadilloXX/flashcards","owner":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArmadilloXX/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/ArmadilloXX/flashcards","forks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/forks","keys_url":"https://api.github.com/repos/ArmadilloXX/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArmadilloXX/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArmadilloXX/flashcards/teams","hooks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/hooks","issue_events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/events","assignees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ArmadilloXX/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/tags","blobs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ArmadilloXX/flashcards/languages","stargazers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/stargazers","contributors_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contributors","subscribers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscribers","subscription_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscription","commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ArmadilloXX/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArmadilloXX/flashcards/merges","archive_url":"https://api.github.com/repos/ArmadilloXX/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArmadilloXX/flashcards/downloads","issues_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ArmadilloXX/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ArmadilloXX/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArmadilloXX/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ArmadilloXX/flashcards/releases{/id}","created_at":"2015-09-21T06:32:52Z","updated_at":"2015-09-21T06:34:53Z","pushed_at":"2015-12-01T10:15:38Z","git_url":"git://github.com/ArmadilloXX/flashcards.git","ssh_url":"git@github.com:ArmadilloXX/flashcards.git","clone_url":"https://github.com/ArmadilloXX/flashcards.git","svn_url":"https://github.com/ArmadilloXX/flashcards","homepage":null,"size":1310,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ArmadilloXX:master","ref":"master","sha":"e6fc8f992f93a96af42df04e4c02397980c16274","user":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"repo":{"id":42848111,"name":"flashcards","full_name":"ArmadilloXX/flashcards","owner":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArmadilloXX/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/ArmadilloXX/flashcards","forks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/forks","keys_url":"https://api.github.com/repos/ArmadilloXX/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArmadilloXX/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArmadilloXX/flashcards/teams","hooks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/hooks","issue_events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/events","assignees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ArmadilloXX/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/tags","blobs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ArmadilloXX/flashcards/languages","stargazers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/stargazers","contributors_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contributors","subscribers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscribers","subscription_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscription","commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ArmadilloXX/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArmadilloXX/flashcards/merges","archive_url":"https://api.github.com/repos/ArmadilloXX/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArmadilloXX/flashcards/downloads","issues_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ArmadilloXX/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ArmadilloXX/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArmadilloXX/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ArmadilloXX/flashcards/releases{/id}","created_at":"2015-09-21T06:32:52Z","updated_at":"2015-09-21T06:34:53Z","pushed_at":"2015-12-01T10:15:38Z","git_url":"git://github.com/ArmadilloXX/flashcards.git","ssh_url":"git@github.com:ArmadilloXX/flashcards.git","clone_url":"https://github.com/ArmadilloXX/flashcards.git","svn_url":"https://github.com/ArmadilloXX/flashcards","homepage":null,"size":1310,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10"},"html":{"href":"https://github.com/ArmadilloXX/flashcards/pull/10"},"issue":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/10"},"comments":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/bce9336f1f046a3a8174d17a445ed4a3e0c3d8a0"}}}}