GitHub PullRequestReviewCommentEvent at 2014-11-24 16:06:10
Repository: capstone-project
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mcquackers/capstone-project/pulls/comments/20799316","id":20799316,"diff_hunk":"@@ -0,0 +1,38 @@\n+module BuddyButtonHelper\n+  def buddy_button(user)\n+    if current_user.buddies.include?(user)\n+      ditch_button(user)\n+    elsif current_user.pending_buddies.include?(user)\n+      pending_button\n+    elsif user.pending_buddies.include?(current_user)\n+      accept_buddy_button(user)\n+    else\n+      add_buddy_button(user)\n+    end\n+  end\n+\n+  private\n+\n+  def buddy_relationship(user)\n+    BuddyRelationship.for(user.id, current_user.id)\n+  end\n+\n+  def pending_button\n+    button_to \"Buddy Request Pending\", {}, disabled: true\n+  end\n+\n+  def ditch_button(user)\n+    button_to \"Ditch this buddy\",\n+      [user, buddy_relationship(user)], method: :delete\n+  end\n+\n+  def accept_buddy_button(user)\n+    button_to \"Accept Buddy Request\",\n+      [user, buddy_relationship(user), confirmed: true], method: :patch\n+  end\n+\n+  def add_buddy_button(user)\n+    button_to \"Send Buddy Request\",\n+      user_buddy_relationships_path(user)","path":"app/helpers/buddy_button_helper.rb","position":36,"original_position":36,"commit_id":"c20e0997185fdf49c1b8075a30f6d76e178bf545","original_commit_id":"c20e0997185fdf49c1b8075a30f6d76e178bf545","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":"Align the parameters of a method call if they span more than one line.","created_at":"2014-11-24T16:06:10Z","updated_at":"2014-11-24T16:06:10Z","html_url":"https://github.com/mcquackers/capstone-project/pull/24#discussion_r20799316","pull_request_url":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/mcquackers/capstone-project/pulls/comments/20799316"},"html":{"href":"https://github.com/mcquackers/capstone-project/pull/24#discussion_r20799316"},"pull_request":{"href":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24","id":24937858,"html_url":"https://github.com/mcquackers/capstone-project/pull/24","diff_url":"https://github.com/mcquackers/capstone-project/pull/24.diff","patch_url":"https://github.com/mcquackers/capstone-project/pull/24.patch","issue_url":"https://api.github.com/repos/mcquackers/capstone-project/issues/24","number":24,"state":"open","locked":false,"title":"Add buddies","user":{"login":"mcquackers","id":8669803,"avatar_url":"https://avatars.githubusercontent.com/u/8669803?v=3","gravatar_id":"","url":"https://api.github.com/users/mcquackers","html_url":"https://github.com/mcquackers","followers_url":"https://api.github.com/users/mcquackers/followers","following_url":"https://api.github.com/users/mcquackers/following{/other_user}","gists_url":"https://api.github.com/users/mcquackers/gists{/gist_id}","starred_url":"https://api.github.com/users/mcquackers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcquackers/subscriptions","organizations_url":"https://api.github.com/users/mcquackers/orgs","repos_url":"https://api.github.com/users/mcquackers/repos","events_url":"https://api.github.com/users/mcquackers/events{/privacy}","received_events_url":"https://api.github.com/users/mcquackers/received_events","type":"User","site_admin":false},"body":"https://trello.com/c/bjJNY4Ub/44-users-can-friend-each-other\r\n\r\nSome latent code was commented for next PR","created_at":"2014-11-24T15:05:41Z","updated_at":"2014-11-24T16:06:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24/commits","review_comments_url":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24/comments","review_comment_url":"https://api.github.com/repos/mcquackers/capstone-project/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mcquackers/capstone-project/issues/24/comments","statuses_url":"https://api.github.com/repos/mcquackers/capstone-project/statuses/c20e0997185fdf49c1b8075a30f6d76e178bf545","head":{"label":"mcquackers:add-buddies","ref":"add-buddies","sha":"c20e0997185fdf49c1b8075a30f6d76e178bf545","user":{"login":"mcquackers","id":8669803,"avatar_url":"https://avatars.githubusercontent.com/u/8669803?v=3","gravatar_id":"","url":"https://api.github.com/users/mcquackers","html_url":"https://github.com/mcquackers","followers_url":"https://api.github.com/users/mcquackers/followers","following_url":"https://api.github.com/users/mcquackers/following{/other_user}","gists_url":"https://api.github.com/users/mcquackers/gists{/gist_id}","starred_url":"https://api.github.com/users/mcquackers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcquackers/subscriptions","organizations_url":"https://api.github.com/users/mcquackers/orgs","repos_url":"https://api.github.com/users/mcquackers/repos","events_url":"https://api.github.com/users/mcquackers/events{/privacy}","received_events_url":"https://api.github.com/users/mcquackers/received_events","type":"User","site_admin":false},"repo":{"id":26760429,"name":"capstone-project","full_name":"mcquackers/capstone-project","owner":{"login":"mcquackers","id":8669803,"avatar_url":"https://avatars.githubusercontent.com/u/8669803?v=3","gravatar_id":"","url":"https://api.github.com/users/mcquackers","html_url":"https://github.com/mcquackers","followers_url":"https://api.github.com/users/mcquackers/followers","following_url":"https://api.github.com/users/mcquackers/following{/other_user}","gists_url":"https://api.github.com/users/mcquackers/gists{/gist_id}","starred_url":"https://api.github.com/users/mcquackers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcquackers/subscriptions","organizations_url":"https://api.github.com/users/mcquackers/orgs","repos_url":"https://api.github.com/users/mcquackers/repos","events_url":"https://api.github.com/users/mcquackers/events{/privacy}","received_events_url":"https://api.github.com/users/mcquackers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcquackers/capstone-project","description":"","fork":false,"url":"https://api.github.com/repos/mcquackers/capstone-project","forks_url":"https://api.github.com/repos/mcquackers/capstone-project/forks","keys_url":"https://api.github.com/repos/mcquackers/capstone-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcquackers/capstone-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcquackers/capstone-project/teams","hooks_url":"https://api.github.com/repos/mcquackers/capstone-project/hooks","issue_events_url":"https://api.github.com/repos/mcquackers/capstone-project/issues/events{/number}","events_url":"https://api.github.com/repos/mcquackers/capstone-project/events","assignees_url":"https://api.github.com/repos/mcquackers/capstone-project/assignees{/user}","branches_url":"https://api.github.com/repos/mcquackers/capstone-project/branches{/branch}","tags_url":"https://api.github.com/repos/mcquackers/capstone-project/tags","blobs_url":"https://api.github.com/repos/mcquackers/capstone-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcquackers/capstone-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcquackers/capstone-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcquackers/capstone-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcquackers/capstone-project/statuses/{sha}","languages_url":"https://api.github.com/repos/mcquackers/capstone-project/languages","stargazers_url":"https://api.github.com/repos/mcquackers/capstone-project/stargazers","contributors_url":"https://api.github.com/repos/mcquackers/capstone-project/contributors","subscribers_url":"https://api.github.com/repos/mcquackers/capstone-project/subscribers","subscription_url":"https://api.github.com/repos/mcquackers/capstone-project/subscription","commits_url":"https://api.github.com/repos/mcquackers/capstone-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcquackers/capstone-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcquackers/capstone-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcquackers/capstone-project/issues/comments/{number}","contents_url":"https://api.github.com/repos/mcquackers/capstone-project/contents/{+path}","compare_url":"https://api.github.com/repos/mcquackers/capstone-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcquackers/capstone-project/merges","archive_url":"https://api.github.com/repos/mcquackers/capstone-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcquackers/capstone-project/downloads","issues_url":"https://api.github.com/repos/mcquackers/capstone-project/issues{/number}","pulls_url":"https://api.github.com/repos/mcquackers/capstone-project/pulls{/number}","milestones_url":"https://api.github.com/repos/mcquackers/capstone-project/milestones{/number}","notifications_url":"https://api.github.com/repos/mcquackers/capstone-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcquackers/capstone-project/labels{/name}","releases_url":"https://api.github.com/repos/mcquackers/capstone-project/releases{/id}","created_at":"2014-11-17T14:34:16Z","updated_at":"2014-11-21T20:41:18Z","pushed_at":"2014-11-24T16:06:05Z","git_url":"git://github.com/mcquackers/capstone-project.git","ssh_url":"git@github.com:mcquackers/capstone-project.git","clone_url":"https://github.com/mcquackers/capstone-project.git","svn_url":"https://github.com/mcquackers/capstone-project","homepage":null,"size":1632,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"mcquackers:master","ref":"master","sha":"ddfb283ab8a3c7fc1a85b5be2443aec986056c71","user":{"login":"mcquackers","id":8669803,"avatar_url":"https://avatars.githubusercontent.com/u/8669803?v=3","gravatar_id":"","url":"https://api.github.com/users/mcquackers","html_url":"https://github.com/mcquackers","followers_url":"https://api.github.com/users/mcquackers/followers","following_url":"https://api.github.com/users/mcquackers/following{/other_user}","gists_url":"https://api.github.com/users/mcquackers/gists{/gist_id}","starred_url":"https://api.github.com/users/mcquackers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcquackers/subscriptions","organizations_url":"https://api.github.com/users/mcquackers/orgs","repos_url":"https://api.github.com/users/mcquackers/repos","events_url":"https://api.github.com/users/mcquackers/events{/privacy}","received_events_url":"https://api.github.com/users/mcquackers/received_events","type":"User","site_admin":false},"repo":{"id":26760429,"name":"capstone-project","full_name":"mcquackers/capstone-project","owner":{"login":"mcquackers","id":8669803,"avatar_url":"https://avatars.githubusercontent.com/u/8669803?v=3","gravatar_id":"","url":"https://api.github.com/users/mcquackers","html_url":"https://github.com/mcquackers","followers_url":"https://api.github.com/users/mcquackers/followers","following_url":"https://api.github.com/users/mcquackers/following{/other_user}","gists_url":"https://api.github.com/users/mcquackers/gists{/gist_id}","starred_url":"https://api.github.com/users/mcquackers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcquackers/subscriptions","organizations_url":"https://api.github.com/users/mcquackers/orgs","repos_url":"https://api.github.com/users/mcquackers/repos","events_url":"https://api.github.com/users/mcquackers/events{/privacy}","received_events_url":"https://api.github.com/users/mcquackers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcquackers/capstone-project","description":"","fork":false,"url":"https://api.github.com/repos/mcquackers/capstone-project","forks_url":"https://api.github.com/repos/mcquackers/capstone-project/forks","keys_url":"https://api.github.com/repos/mcquackers/capstone-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcquackers/capstone-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcquackers/capstone-project/teams","hooks_url":"https://api.github.com/repos/mcquackers/capstone-project/hooks","issue_events_url":"https://api.github.com/repos/mcquackers/capstone-project/issues/events{/number}","events_url":"https://api.github.com/repos/mcquackers/capstone-project/events","assignees_url":"https://api.github.com/repos/mcquackers/capstone-project/assignees{/user}","branches_url":"https://api.github.com/repos/mcquackers/capstone-project/branches{/branch}","tags_url":"https://api.github.com/repos/mcquackers/capstone-project/tags","blobs_url":"https://api.github.com/repos/mcquackers/capstone-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcquackers/capstone-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcquackers/capstone-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcquackers/capstone-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcquackers/capstone-project/statuses/{sha}","languages_url":"https://api.github.com/repos/mcquackers/capstone-project/languages","stargazers_url":"https://api.github.com/repos/mcquackers/capstone-project/stargazers","contributors_url":"https://api.github.com/repos/mcquackers/capstone-project/contributors","subscribers_url":"https://api.github.com/repos/mcquackers/capstone-project/subscribers","subscription_url":"https://api.github.com/repos/mcquackers/capstone-project/subscription","commits_url":"https://api.github.com/repos/mcquackers/capstone-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcquackers/capstone-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcquackers/capstone-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcquackers/capstone-project/issues/comments/{number}","contents_url":"https://api.github.com/repos/mcquackers/capstone-project/contents/{+path}","compare_url":"https://api.github.com/repos/mcquackers/capstone-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcquackers/capstone-project/merges","archive_url":"https://api.github.com/repos/mcquackers/capstone-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcquackers/capstone-project/downloads","issues_url":"https://api.github.com/repos/mcquackers/capstone-project/issues{/number}","pulls_url":"https://api.github.com/repos/mcquackers/capstone-project/pulls{/number}","milestones_url":"https://api.github.com/repos/mcquackers/capstone-project/milestones{/number}","notifications_url":"https://api.github.com/repos/mcquackers/capstone-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcquackers/capstone-project/labels{/name}","releases_url":"https://api.github.com/repos/mcquackers/capstone-project/releases{/id}","created_at":"2014-11-17T14:34:16Z","updated_at":"2014-11-21T20:41:18Z","pushed_at":"2014-11-24T16:06:05Z","git_url":"git://github.com/mcquackers/capstone-project.git","ssh_url":"git@github.com:mcquackers/capstone-project.git","clone_url":"https://github.com/mcquackers/capstone-project.git","svn_url":"https://github.com/mcquackers/capstone-project","homepage":null,"size":1632,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24"},"html":{"href":"https://github.com/mcquackers/capstone-project/pull/24"},"issue":{"href":"https://api.github.com/repos/mcquackers/capstone-project/issues/24"},"comments":{"href":"https://api.github.com/repos/mcquackers/capstone-project/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/mcquackers/capstone-project/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mcquackers/capstone-project/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/mcquackers/capstone-project/statuses/c20e0997185fdf49c1b8075a30f6d76e178bf545"}}}}