{"action":"created","comment":{"url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/comments/89839417","pull_request_review_id":10372152,"id":89839417,"diff_hunk":"@@ -36,17 +45,31 @@ def vote(data)\n     song = Song.find_by(id: song_id, event: @event)\n     return if song.nil?\n \n+    vote_text = \"\"\n     if data['upvote']\n-      song.upvote(current_user)\n+      if song.upvote(current_user)\n+        vote_text = \"Upvoted\"\n+      else\n+        vote_text = \"Upvote removed for\"\n+      end\n     else\n-      song.downvote(current_user)\n+      if song.downvote(current_user)","path":"app/channels/event_channel.rb","position":44,"original_position":44,"commit_id":"831c96910e78649e2664291d76e4048cae80e520","original_commit_id":"831c96910e78649e2664291d76e4048cae80e520","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":"Use the return of the conditional for variable assignment and comparison.<br>Convert if nested inside else to elsif.","created_at":"2016-11-28T17:53:21Z","updated_at":"2016-11-28T17:53:21Z","html_url":"https://github.com/Play-This-For-Us/playthisforus/pull/109#discussion_r89839417","pull_request_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/comments/89839417"},"html":{"href":"https://github.com/Play-This-For-Us/playthisforus/pull/109#discussion_r89839417"},"pull_request":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109","id":95540417,"html_url":"https://github.com/Play-This-For-Us/playthisforus/pull/109","diff_url":"https://github.com/Play-This-For-Us/playthisforus/pull/109.diff","patch_url":"https://github.com/Play-This-For-Us/playthisforus/pull/109.patch","issue_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/109","number":109,"state":"open","locked":false,"title":"Add alerts for in-app actions","user":{"login":"Skovy","id":5247455,"avatar_url":"https://avatars.githubusercontent.com/u/5247455?v=3","gravatar_id":"","url":"https://api.github.com/users/Skovy","html_url":"https://github.com/Skovy","followers_url":"https://api.github.com/users/Skovy/followers","following_url":"https://api.github.com/users/Skovy/following{/other_user}","gists_url":"https://api.github.com/users/Skovy/gists{/gist_id}","starred_url":"https://api.github.com/users/Skovy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skovy/subscriptions","organizations_url":"https://api.github.com/users/Skovy/orgs","repos_url":"https://api.github.com/users/Skovy/repos","events_url":"https://api.github.com/users/Skovy/events{/privacy}","received_events_url":"https://api.github.com/users/Skovy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-28T17:18:36Z","updated_at":"2016-11-28T17:53:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b01f047a9258cee7cd0f216255625abc243ca79d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109/commits","review_comments_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109/comments","review_comment_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/109/comments","statuses_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/statuses/831c96910e78649e2664291d76e4048cae80e520","head":{"label":"Play-This-For-Us:alerts","ref":"alerts","sha":"831c96910e78649e2664291d76e4048cae80e520","user":{"login":"Play-This-For-Us","id":22351059,"avatar_url":"https://avatars.githubusercontent.com/u/22351059?v=3","gravatar_id":"","url":"https://api.github.com/users/Play-This-For-Us","html_url":"https://github.com/Play-This-For-Us","followers_url":"https://api.github.com/users/Play-This-For-Us/followers","following_url":"https://api.github.com/users/Play-This-For-Us/following{/other_user}","gists_url":"https://api.github.com/users/Play-This-For-Us/gists{/gist_id}","starred_url":"https://api.github.com/users/Play-This-For-Us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Play-This-For-Us/subscriptions","organizations_url":"https://api.github.com/users/Play-This-For-Us/orgs","repos_url":"https://api.github.com/users/Play-This-For-Us/repos","events_url":"https://api.github.com/users/Play-This-For-Us/events{/privacy}","received_events_url":"https://api.github.com/users/Play-This-For-Us/received_events","type":"Organization","site_admin":false},"repo":{"id":68837934,"name":"playthisforus","full_name":"Play-This-For-Us/playthisforus","owner":{"login":"Play-This-For-Us","id":22351059,"avatar_url":"https://avatars.githubusercontent.com/u/22351059?v=3","gravatar_id":"","url":"https://api.github.com/users/Play-This-For-Us","html_url":"https://github.com/Play-This-For-Us","followers_url":"https://api.github.com/users/Play-This-For-Us/followers","following_url":"https://api.github.com/users/Play-This-For-Us/following{/other_user}","gists_url":"https://api.github.com/users/Play-This-For-Us/gists{/gist_id}","starred_url":"https://api.github.com/users/Play-This-For-Us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Play-This-For-Us/subscriptions","organizations_url":"https://api.github.com/users/Play-This-For-Us/orgs","repos_url":"https://api.github.com/users/Play-This-For-Us/repos","events_url":"https://api.github.com/users/Play-This-For-Us/events{/privacy}","received_events_url":"https://api.github.com/users/Play-This-For-Us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Play-This-For-Us/playthisforus","description":null,"fork":false,"url":"https://api.github.com/repos/Play-This-For-Us/playthisforus","forks_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/forks","keys_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/teams","hooks_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/hooks","issue_events_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/events{/number}","events_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/events","assignees_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/assignees{/user}","branches_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/branches{/branch}","tags_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/tags","blobs_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/statuses/{sha}","languages_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/languages","stargazers_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/stargazers","contributors_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/contributors","subscribers_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/subscribers","subscription_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/subscription","commits_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/contents/{+path}","compare_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/merges","archive_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/downloads","issues_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues{/number}","pulls_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls{/number}","milestones_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/milestones{/number}","notifications_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/labels{/name}","releases_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/releases{/id}","deployments_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/deployments","created_at":"2016-09-21T16:48:23Z","updated_at":"2016-11-14T16:00:25Z","pushed_at":"2016-11-28T17:53:10Z","git_url":"git://github.com/Play-This-For-Us/playthisforus.git","ssh_url":"git@github.com:Play-This-For-Us/playthisforus.git","clone_url":"https://github.com/Play-This-For-Us/playthisforus.git","svn_url":"https://github.com/Play-This-For-Us/playthisforus","homepage":null,"size":25543,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":4,"default_branch":"master"}},"base":{"label":"Play-This-For-Us:master","ref":"master","sha":"76e2e7ec83729adbada5e733939c444621c93653","user":{"login":"Play-This-For-Us","id":22351059,"avatar_url":"https://avatars.githubusercontent.com/u/22351059?v=3","gravatar_id":"","url":"https://api.github.com/users/Play-This-For-Us","html_url":"https://github.com/Play-This-For-Us","followers_url":"https://api.github.com/users/Play-This-For-Us/followers","following_url":"https://api.github.com/users/Play-This-For-Us/following{/other_user}","gists_url":"https://api.github.com/users/Play-This-For-Us/gists{/gist_id}","starred_url":"https://api.github.com/users/Play-This-For-Us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Play-This-For-Us/subscriptions","organizations_url":"https://api.github.com/users/Play-This-For-Us/orgs","repos_url":"https://api.github.com/users/Play-This-For-Us/repos","events_url":"https://api.github.com/users/Play-This-For-Us/events{/privacy}","received_events_url":"https://api.github.com/users/Play-This-For-Us/received_events","type":"Organization","site_admin":false},"repo":{"id":68837934,"name":"playthisforus","full_name":"Play-This-For-Us/playthisforus","owner":{"login":"Play-This-For-Us","id":22351059,"avatar_url":"https://avatars.githubusercontent.com/u/22351059?v=3","gravatar_id":"","url":"https://api.github.com/users/Play-This-For-Us","html_url":"https://github.com/Play-This-For-Us","followers_url":"https://api.github.com/users/Play-This-For-Us/followers","following_url":"https://api.github.com/users/Play-This-For-Us/following{/other_user}","gists_url":"https://api.github.com/users/Play-This-For-Us/gists{/gist_id}","starred_url":"https://api.github.com/users/Play-This-For-Us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Play-This-For-Us/subscriptions","organizations_url":"https://api.github.com/users/Play-This-For-Us/orgs","repos_url":"https://api.github.com/users/Play-This-For-Us/repos","events_url":"https://api.github.com/users/Play-This-For-Us/events{/privacy}","received_events_url":"https://api.github.com/users/Play-This-For-Us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Play-This-For-Us/playthisforus","description":null,"fork":false,"url":"https://api.github.com/repos/Play-This-For-Us/playthisforus","forks_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/forks","keys_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/teams","hooks_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/hooks","issue_events_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/events{/number}","events_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/events","assignees_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/assignees{/user}","branches_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/branches{/branch}","tags_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/tags","blobs_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/statuses/{sha}","languages_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/languages","stargazers_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/stargazers","contributors_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/contributors","subscribers_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/subscribers","subscription_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/subscription","commits_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/contents/{+path}","compare_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/merges","archive_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/downloads","issues_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues{/number}","pulls_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls{/number}","milestones_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/milestones{/number}","notifications_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/labels{/name}","releases_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/releases{/id}","deployments_url":"https://api.github.com/repos/Play-This-For-Us/playthisforus/deployments","created_at":"2016-09-21T16:48:23Z","updated_at":"2016-11-14T16:00:25Z","pushed_at":"2016-11-28T17:53:10Z","git_url":"git://github.com/Play-This-For-Us/playthisforus.git","ssh_url":"git@github.com:Play-This-For-Us/playthisforus.git","clone_url":"https://github.com/Play-This-For-Us/playthisforus.git","svn_url":"https://github.com/Play-This-For-Us/playthisforus","homepage":null,"size":25543,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109"},"html":{"href":"https://github.com/Play-This-For-Us/playthisforus/pull/109"},"issue":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/109"},"comments":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/Play-This-For-Us/playthisforus/statuses/831c96910e78649e2664291d76e4048cae80e520"}}}}
{"actor":{"display_login":"houndci-bot"}}