{"action":"created","comment":{"url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/comments/74869711","id":74869711,"diff_hunk":"@@ -2,4 +2,29 @@ class Holescore < ActiveRecord::Base\n   belongs_to :hole\n   belongs_to :user\n   belongs_to :match\n+\n+  def assign_strokes(user, match)\n+    if user == match.hero && (1..18) === match.hero_adj_handicap\n+      if hole.difficulty <= match.hero_adj_handicap\n+        self.strokes = 1\n+      end\n+    elsif user == match.hero && match.hero_adj_handicap > 18\n+      if (hole.difficulty + 18) <= match.hero_adj_handicap","path":"app/models/holescore.rb","position":11,"original_position":11,"commit_id":"000e9752dddd74241f13612878220eb319bd301d","original_commit_id":"000e9752dddd74241f13612878220eb319bd301d","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.","created_at":"2016-08-16T02:57:04Z","updated_at":"2016-08-16T02:57:04Z","html_url":"https://github.com/evanlouden/breakable_toy/pull/35#discussion_r74869711","pull_request_url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/comments/74869711"},"html":{"href":"https://github.com/evanlouden/breakable_toy/pull/35#discussion_r74869711"},"pull_request":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35","id":81407676,"html_url":"https://github.com/evanlouden/breakable_toy/pull/35","diff_url":"https://github.com/evanlouden/breakable_toy/pull/35.diff","patch_url":"https://github.com/evanlouden/breakable_toy/pull/35.patch","issue_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues/35","number":35,"state":"open","locked":false,"title":"refactor assign_strokes method","user":{"login":"evanlouden","id":17486293,"avatar_url":"https://avatars.githubusercontent.com/u/17486293?v=3","gravatar_id":"","url":"https://api.github.com/users/evanlouden","html_url":"https://github.com/evanlouden","followers_url":"https://api.github.com/users/evanlouden/followers","following_url":"https://api.github.com/users/evanlouden/following{/other_user}","gists_url":"https://api.github.com/users/evanlouden/gists{/gist_id}","starred_url":"https://api.github.com/users/evanlouden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanlouden/subscriptions","organizations_url":"https://api.github.com/users/evanlouden/orgs","repos_url":"https://api.github.com/users/evanlouden/repos","events_url":"https://api.github.com/users/evanlouden/events{/privacy}","received_events_url":"https://api.github.com/users/evanlouden/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-16T02:57:00Z","updated_at":"2016-08-16T02:57:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6ce10b29b6a4200bbb61827f2066ee30974787e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35/commits","review_comments_url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35/comments","review_comment_url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues/35/comments","statuses_url":"https://api.github.com/repos/evanlouden/breakable_toy/statuses/000e9752dddd74241f13612878220eb319bd301d","head":{"label":"evanlouden:refactor2","ref":"refactor2","sha":"000e9752dddd74241f13612878220eb319bd301d","user":{"login":"evanlouden","id":17486293,"avatar_url":"https://avatars.githubusercontent.com/u/17486293?v=3","gravatar_id":"","url":"https://api.github.com/users/evanlouden","html_url":"https://github.com/evanlouden","followers_url":"https://api.github.com/users/evanlouden/followers","following_url":"https://api.github.com/users/evanlouden/following{/other_user}","gists_url":"https://api.github.com/users/evanlouden/gists{/gist_id}","starred_url":"https://api.github.com/users/evanlouden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanlouden/subscriptions","organizations_url":"https://api.github.com/users/evanlouden/orgs","repos_url":"https://api.github.com/users/evanlouden/repos","events_url":"https://api.github.com/users/evanlouden/events{/privacy}","received_events_url":"https://api.github.com/users/evanlouden/received_events","type":"User","site_admin":false},"repo":{"id":56417064,"name":"breakable_toy","full_name":"evanlouden/breakable_toy","owner":{"login":"evanlouden","id":17486293,"avatar_url":"https://avatars.githubusercontent.com/u/17486293?v=3","gravatar_id":"","url":"https://api.github.com/users/evanlouden","html_url":"https://github.com/evanlouden","followers_url":"https://api.github.com/users/evanlouden/followers","following_url":"https://api.github.com/users/evanlouden/following{/other_user}","gists_url":"https://api.github.com/users/evanlouden/gists{/gist_id}","starred_url":"https://api.github.com/users/evanlouden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanlouden/subscriptions","organizations_url":"https://api.github.com/users/evanlouden/orgs","repos_url":"https://api.github.com/users/evanlouden/repos","events_url":"https://api.github.com/users/evanlouden/events{/privacy}","received_events_url":"https://api.github.com/users/evanlouden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evanlouden/breakable_toy","description":"Final project for Spring 2016 Cohort at Launch Academy","fork":false,"url":"https://api.github.com/repos/evanlouden/breakable_toy","forks_url":"https://api.github.com/repos/evanlouden/breakable_toy/forks","keys_url":"https://api.github.com/repos/evanlouden/breakable_toy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evanlouden/breakable_toy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evanlouden/breakable_toy/teams","hooks_url":"https://api.github.com/repos/evanlouden/breakable_toy/hooks","issue_events_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues/events{/number}","events_url":"https://api.github.com/repos/evanlouden/breakable_toy/events","assignees_url":"https://api.github.com/repos/evanlouden/breakable_toy/assignees{/user}","branches_url":"https://api.github.com/repos/evanlouden/breakable_toy/branches{/branch}","tags_url":"https://api.github.com/repos/evanlouden/breakable_toy/tags","blobs_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/refs{/sha}","trees_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evanlouden/breakable_toy/statuses/{sha}","languages_url":"https://api.github.com/repos/evanlouden/breakable_toy/languages","stargazers_url":"https://api.github.com/repos/evanlouden/breakable_toy/stargazers","contributors_url":"https://api.github.com/repos/evanlouden/breakable_toy/contributors","subscribers_url":"https://api.github.com/repos/evanlouden/breakable_toy/subscribers","subscription_url":"https://api.github.com/repos/evanlouden/breakable_toy/subscription","commits_url":"https://api.github.com/repos/evanlouden/breakable_toy/commits{/sha}","git_commits_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/commits{/sha}","comments_url":"https://api.github.com/repos/evanlouden/breakable_toy/comments{/number}","issue_comment_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues/comments{/number}","contents_url":"https://api.github.com/repos/evanlouden/breakable_toy/contents/{+path}","compare_url":"https://api.github.com/repos/evanlouden/breakable_toy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evanlouden/breakable_toy/merges","archive_url":"https://api.github.com/repos/evanlouden/breakable_toy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evanlouden/breakable_toy/downloads","issues_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues{/number}","pulls_url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls{/number}","milestones_url":"https://api.github.com/repos/evanlouden/breakable_toy/milestones{/number}","notifications_url":"https://api.github.com/repos/evanlouden/breakable_toy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evanlouden/breakable_toy/labels{/name}","releases_url":"https://api.github.com/repos/evanlouden/breakable_toy/releases{/id}","deployments_url":"https://api.github.com/repos/evanlouden/breakable_toy/deployments","created_at":"2016-04-17T03:25:12Z","updated_at":"2016-04-17T03:26:29Z","pushed_at":"2016-08-16T02:57:01Z","git_url":"git://github.com/evanlouden/breakable_toy.git","ssh_url":"git@github.com:evanlouden/breakable_toy.git","clone_url":"https://github.com/evanlouden/breakable_toy.git","svn_url":"https://github.com/evanlouden/breakable_toy","homepage":null,"size":329,"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":"evanlouden:master","ref":"master","sha":"a302f80b453eaac6963f001b54d70e3eb3360be3","user":{"login":"evanlouden","id":17486293,"avatar_url":"https://avatars.githubusercontent.com/u/17486293?v=3","gravatar_id":"","url":"https://api.github.com/users/evanlouden","html_url":"https://github.com/evanlouden","followers_url":"https://api.github.com/users/evanlouden/followers","following_url":"https://api.github.com/users/evanlouden/following{/other_user}","gists_url":"https://api.github.com/users/evanlouden/gists{/gist_id}","starred_url":"https://api.github.com/users/evanlouden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanlouden/subscriptions","organizations_url":"https://api.github.com/users/evanlouden/orgs","repos_url":"https://api.github.com/users/evanlouden/repos","events_url":"https://api.github.com/users/evanlouden/events{/privacy}","received_events_url":"https://api.github.com/users/evanlouden/received_events","type":"User","site_admin":false},"repo":{"id":56417064,"name":"breakable_toy","full_name":"evanlouden/breakable_toy","owner":{"login":"evanlouden","id":17486293,"avatar_url":"https://avatars.githubusercontent.com/u/17486293?v=3","gravatar_id":"","url":"https://api.github.com/users/evanlouden","html_url":"https://github.com/evanlouden","followers_url":"https://api.github.com/users/evanlouden/followers","following_url":"https://api.github.com/users/evanlouden/following{/other_user}","gists_url":"https://api.github.com/users/evanlouden/gists{/gist_id}","starred_url":"https://api.github.com/users/evanlouden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanlouden/subscriptions","organizations_url":"https://api.github.com/users/evanlouden/orgs","repos_url":"https://api.github.com/users/evanlouden/repos","events_url":"https://api.github.com/users/evanlouden/events{/privacy}","received_events_url":"https://api.github.com/users/evanlouden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evanlouden/breakable_toy","description":"Final project for Spring 2016 Cohort at Launch Academy","fork":false,"url":"https://api.github.com/repos/evanlouden/breakable_toy","forks_url":"https://api.github.com/repos/evanlouden/breakable_toy/forks","keys_url":"https://api.github.com/repos/evanlouden/breakable_toy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evanlouden/breakable_toy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evanlouden/breakable_toy/teams","hooks_url":"https://api.github.com/repos/evanlouden/breakable_toy/hooks","issue_events_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues/events{/number}","events_url":"https://api.github.com/repos/evanlouden/breakable_toy/events","assignees_url":"https://api.github.com/repos/evanlouden/breakable_toy/assignees{/user}","branches_url":"https://api.github.com/repos/evanlouden/breakable_toy/branches{/branch}","tags_url":"https://api.github.com/repos/evanlouden/breakable_toy/tags","blobs_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/refs{/sha}","trees_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evanlouden/breakable_toy/statuses/{sha}","languages_url":"https://api.github.com/repos/evanlouden/breakable_toy/languages","stargazers_url":"https://api.github.com/repos/evanlouden/breakable_toy/stargazers","contributors_url":"https://api.github.com/repos/evanlouden/breakable_toy/contributors","subscribers_url":"https://api.github.com/repos/evanlouden/breakable_toy/subscribers","subscription_url":"https://api.github.com/repos/evanlouden/breakable_toy/subscription","commits_url":"https://api.github.com/repos/evanlouden/breakable_toy/commits{/sha}","git_commits_url":"https://api.github.com/repos/evanlouden/breakable_toy/git/commits{/sha}","comments_url":"https://api.github.com/repos/evanlouden/breakable_toy/comments{/number}","issue_comment_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues/comments{/number}","contents_url":"https://api.github.com/repos/evanlouden/breakable_toy/contents/{+path}","compare_url":"https://api.github.com/repos/evanlouden/breakable_toy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evanlouden/breakable_toy/merges","archive_url":"https://api.github.com/repos/evanlouden/breakable_toy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evanlouden/breakable_toy/downloads","issues_url":"https://api.github.com/repos/evanlouden/breakable_toy/issues{/number}","pulls_url":"https://api.github.com/repos/evanlouden/breakable_toy/pulls{/number}","milestones_url":"https://api.github.com/repos/evanlouden/breakable_toy/milestones{/number}","notifications_url":"https://api.github.com/repos/evanlouden/breakable_toy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evanlouden/breakable_toy/labels{/name}","releases_url":"https://api.github.com/repos/evanlouden/breakable_toy/releases{/id}","deployments_url":"https://api.github.com/repos/evanlouden/breakable_toy/deployments","created_at":"2016-04-17T03:25:12Z","updated_at":"2016-04-17T03:26:29Z","pushed_at":"2016-08-16T02:57:01Z","git_url":"git://github.com/evanlouden/breakable_toy.git","ssh_url":"git@github.com:evanlouden/breakable_toy.git","clone_url":"https://github.com/evanlouden/breakable_toy.git","svn_url":"https://github.com/evanlouden/breakable_toy","homepage":null,"size":329,"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/evanlouden/breakable_toy/pulls/35"},"html":{"href":"https://github.com/evanlouden/breakable_toy/pull/35"},"issue":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/issues/35"},"comments":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/evanlouden/breakable_toy/statuses/000e9752dddd74241f13612878220eb319bd301d"}}}}
{"actor":{"display_login":"houndci-bot"}}