{"action":"created","comment":{"url":"https://api.github.com/repos/nwalberts/urbanite/pulls/comments/59783638","id":59783638,"diff_hunk":"@@ -0,0 +1,69 @@\n+$(document).ready(function() {\n+  $(\".new_upvote\").on(\"click\", function(event) {\n+    event.preventDefault();\n+\n+    var url = $(this).parent().attr(\"action\");\n+    updateUpvote(url);\n+  });\n+\n+  $(\".new_downvote\").on(\"click\", function(event) {\n+    event.preventDefault();\n+\n+    var url = $(this).parent().attr(\"action\");\n+    updateDownvote(url);\n+  });\n+});\n+\n+var updateUpvote = function(url) {\n+  var reviewId = window.location.pathname.match(/\\/(\\d+)$/)[1];\n+  $.ajax({\n+    method: \"POST\",\n+    url: url,\n+    data: { review_id: reviewId },\n+    success: function(responseData) {\n+      writeUpvote(responseData.id);\n+    },\n+    error: function()  {\n+      alert(\"error!\");\n+    }\n+  });\n+};\n+\n+var writeUpvote = function(id) {\n+  var reviewIdSelector = '#review-' + id;","path":"app/assets/javascripts/vote.js","position":33,"original_position":33,"commit_id":"0da59a16da2ed86171939a1212f4631b04b74ad2","original_commit_id":"0da59a16da2ed86171939a1212f4631b04b74ad2","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Mixed double and single quotes.","created_at":"2016-04-14T20:16:35Z","updated_at":"2016-04-14T20:16:35Z","html_url":"https://github.com/nwalberts/urbanite/pull/27#discussion_r59783638","pull_request_url":"https://api.github.com/repos/nwalberts/urbanite/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/nwalberts/urbanite/pulls/comments/59783638"},"html":{"href":"https://github.com/nwalberts/urbanite/pull/27#discussion_r59783638"},"pull_request":{"href":"https://api.github.com/repos/nwalberts/urbanite/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/nwalberts/urbanite/pulls/27","id":66544393,"html_url":"https://github.com/nwalberts/urbanite/pull/27","diff_url":"https://github.com/nwalberts/urbanite/pull/27.diff","patch_url":"https://github.com/nwalberts/urbanite/pull/27.patch","issue_url":"https://api.github.com/repos/nwalberts/urbanite/issues/27","number":27,"state":"open","locked":false,"title":"Voting ajax","user":{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars.githubusercontent.com/u/16418059?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-14T19:59:59Z","updated_at":"2016-04-14T20:16:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5fa29c69e4e249aa1109b4468fd855077ab40ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nwalberts/urbanite/pulls/27/commits","review_comments_url":"https://api.github.com/repos/nwalberts/urbanite/pulls/27/comments","review_comment_url":"https://api.github.com/repos/nwalberts/urbanite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nwalberts/urbanite/issues/27/comments","statuses_url":"https://api.github.com/repos/nwalberts/urbanite/statuses/0da59a16da2ed86171939a1212f4631b04b74ad2","head":{"label":"nwalberts:voting_ajax","ref":"voting_ajax","sha":"0da59a16da2ed86171939a1212f4631b04b74ad2","user":{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars.githubusercontent.com/u/16418059?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false},"repo":{"id":55422229,"name":"urbanite","full_name":"nwalberts/urbanite","owner":{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars.githubusercontent.com/u/16418059?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nwalberts/urbanite","description":"The most epic city review app ever","fork":false,"url":"https://api.github.com/repos/nwalberts/urbanite","forks_url":"https://api.github.com/repos/nwalberts/urbanite/forks","keys_url":"https://api.github.com/repos/nwalberts/urbanite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nwalberts/urbanite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nwalberts/urbanite/teams","hooks_url":"https://api.github.com/repos/nwalberts/urbanite/hooks","issue_events_url":"https://api.github.com/repos/nwalberts/urbanite/issues/events{/number}","events_url":"https://api.github.com/repos/nwalberts/urbanite/events","assignees_url":"https://api.github.com/repos/nwalberts/urbanite/assignees{/user}","branches_url":"https://api.github.com/repos/nwalberts/urbanite/branches{/branch}","tags_url":"https://api.github.com/repos/nwalberts/urbanite/tags","blobs_url":"https://api.github.com/repos/nwalberts/urbanite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nwalberts/urbanite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nwalberts/urbanite/git/refs{/sha}","trees_url":"https://api.github.com/repos/nwalberts/urbanite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nwalberts/urbanite/statuses/{sha}","languages_url":"https://api.github.com/repos/nwalberts/urbanite/languages","stargazers_url":"https://api.github.com/repos/nwalberts/urbanite/stargazers","contributors_url":"https://api.github.com/repos/nwalberts/urbanite/contributors","subscribers_url":"https://api.github.com/repos/nwalberts/urbanite/subscribers","subscription_url":"https://api.github.com/repos/nwalberts/urbanite/subscription","commits_url":"https://api.github.com/repos/nwalberts/urbanite/commits{/sha}","git_commits_url":"https://api.github.com/repos/nwalberts/urbanite/git/commits{/sha}","comments_url":"https://api.github.com/repos/nwalberts/urbanite/comments{/number}","issue_comment_url":"https://api.github.com/repos/nwalberts/urbanite/issues/comments{/number}","contents_url":"https://api.github.com/repos/nwalberts/urbanite/contents/{+path}","compare_url":"https://api.github.com/repos/nwalberts/urbanite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nwalberts/urbanite/merges","archive_url":"https://api.github.com/repos/nwalberts/urbanite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nwalberts/urbanite/downloads","issues_url":"https://api.github.com/repos/nwalberts/urbanite/issues{/number}","pulls_url":"https://api.github.com/repos/nwalberts/urbanite/pulls{/number}","milestones_url":"https://api.github.com/repos/nwalberts/urbanite/milestones{/number}","notifications_url":"https://api.github.com/repos/nwalberts/urbanite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nwalberts/urbanite/labels{/name}","releases_url":"https://api.github.com/repos/nwalberts/urbanite/releases{/id}","deployments_url":"https://api.github.com/repos/nwalberts/urbanite/deployments","created_at":"2016-04-04T15:23:54Z","updated_at":"2016-04-04T15:59:49Z","pushed_at":"2016-04-14T20:16:28Z","git_url":"git://github.com/nwalberts/urbanite.git","ssh_url":"git@github.com:nwalberts/urbanite.git","clone_url":"https://github.com/nwalberts/urbanite.git","svn_url":"https://github.com/nwalberts/urbanite","homepage":null,"size":377,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"nwalberts:master","ref":"master","sha":"32a811549bedf3fdd845f6e73a9c8baa7cc755f0","user":{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars.githubusercontent.com/u/16418059?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false},"repo":{"id":55422229,"name":"urbanite","full_name":"nwalberts/urbanite","owner":{"login":"nwalberts","id":16418059,"avatar_url":"https://avatars.githubusercontent.com/u/16418059?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalberts","html_url":"https://github.com/nwalberts","followers_url":"https://api.github.com/users/nwalberts/followers","following_url":"https://api.github.com/users/nwalberts/following{/other_user}","gists_url":"https://api.github.com/users/nwalberts/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalberts/subscriptions","organizations_url":"https://api.github.com/users/nwalberts/orgs","repos_url":"https://api.github.com/users/nwalberts/repos","events_url":"https://api.github.com/users/nwalberts/events{/privacy}","received_events_url":"https://api.github.com/users/nwalberts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nwalberts/urbanite","description":"The most epic city review app ever","fork":false,"url":"https://api.github.com/repos/nwalberts/urbanite","forks_url":"https://api.github.com/repos/nwalberts/urbanite/forks","keys_url":"https://api.github.com/repos/nwalberts/urbanite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nwalberts/urbanite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nwalberts/urbanite/teams","hooks_url":"https://api.github.com/repos/nwalberts/urbanite/hooks","issue_events_url":"https://api.github.com/repos/nwalberts/urbanite/issues/events{/number}","events_url":"https://api.github.com/repos/nwalberts/urbanite/events","assignees_url":"https://api.github.com/repos/nwalberts/urbanite/assignees{/user}","branches_url":"https://api.github.com/repos/nwalberts/urbanite/branches{/branch}","tags_url":"https://api.github.com/repos/nwalberts/urbanite/tags","blobs_url":"https://api.github.com/repos/nwalberts/urbanite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nwalberts/urbanite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nwalberts/urbanite/git/refs{/sha}","trees_url":"https://api.github.com/repos/nwalberts/urbanite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nwalberts/urbanite/statuses/{sha}","languages_url":"https://api.github.com/repos/nwalberts/urbanite/languages","stargazers_url":"https://api.github.com/repos/nwalberts/urbanite/stargazers","contributors_url":"https://api.github.com/repos/nwalberts/urbanite/contributors","subscribers_url":"https://api.github.com/repos/nwalberts/urbanite/subscribers","subscription_url":"https://api.github.com/repos/nwalberts/urbanite/subscription","commits_url":"https://api.github.com/repos/nwalberts/urbanite/commits{/sha}","git_commits_url":"https://api.github.com/repos/nwalberts/urbanite/git/commits{/sha}","comments_url":"https://api.github.com/repos/nwalberts/urbanite/comments{/number}","issue_comment_url":"https://api.github.com/repos/nwalberts/urbanite/issues/comments{/number}","contents_url":"https://api.github.com/repos/nwalberts/urbanite/contents/{+path}","compare_url":"https://api.github.com/repos/nwalberts/urbanite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nwalberts/urbanite/merges","archive_url":"https://api.github.com/repos/nwalberts/urbanite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nwalberts/urbanite/downloads","issues_url":"https://api.github.com/repos/nwalberts/urbanite/issues{/number}","pulls_url":"https://api.github.com/repos/nwalberts/urbanite/pulls{/number}","milestones_url":"https://api.github.com/repos/nwalberts/urbanite/milestones{/number}","notifications_url":"https://api.github.com/repos/nwalberts/urbanite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nwalberts/urbanite/labels{/name}","releases_url":"https://api.github.com/repos/nwalberts/urbanite/releases{/id}","deployments_url":"https://api.github.com/repos/nwalberts/urbanite/deployments","created_at":"2016-04-04T15:23:54Z","updated_at":"2016-04-04T15:59:49Z","pushed_at":"2016-04-14T20:16:28Z","git_url":"git://github.com/nwalberts/urbanite.git","ssh_url":"git@github.com:nwalberts/urbanite.git","clone_url":"https://github.com/nwalberts/urbanite.git","svn_url":"https://github.com/nwalberts/urbanite","homepage":null,"size":377,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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/nwalberts/urbanite/pulls/27"},"html":{"href":"https://github.com/nwalberts/urbanite/pull/27"},"issue":{"href":"https://api.github.com/repos/nwalberts/urbanite/issues/27"},"comments":{"href":"https://api.github.com/repos/nwalberts/urbanite/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/nwalberts/urbanite/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/nwalberts/urbanite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nwalberts/urbanite/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/nwalberts/urbanite/statuses/0da59a16da2ed86171939a1212f4631b04b74ad2"}}}}