{"action":"created","comment":{"url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/comments/192602168","pull_request_review_id":125408012,"id":192602168,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjYwMjE2OA==","diff_hunk":"@@ -148,23 +148,29 @@ def top_buyers(selected = 20)\n     customer_ids.map {|id| @parent.customers.find_by_id(id)}\n   end\n \n-  def mode(array)\n-    a = array.group_by {|num| num}\n-    a.max_by {|key, value| value.count}.flatten.uniq[0]\n+  def invoice_totals_for_customer_id(customer_id)\n+    invoices = @parent.invoices.find_all_by_customer_id(customer_id)\n+    invoices.map {|invoice| invoice_total(invoice.id)}\n   end\n \n-  def top_merchant_for_customer(customer_id)\n+  def merchant_ids_for_customer(customer_id)\n     invoices = @parent.invoices.find_all_by_customer_id(customer_id)\n-    invoice_totals = invoices.map {|invoice| invoice_total(invoice.id)}\n-    merchant_ids = invoices.map {|invoice| invoice.merchant_id}\n+    invoices.map {|invoice| invoice.merchant_id}","path":"lib/sales_analyst.rb","position":17,"original_position":17,"commit_id":"4c8d1beeadc9a194090345f56face6188ed082f8","original_commit_id":"4c8d1beeadc9a194090345f56face6188ed082f8","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"Layout/SpaceInsideBlockBraces: Space between { and | missing.<br>Style/SymbolProc: Pass &:merchant_id as an argument to map instead of a block.<br>Layout/SpaceInsideBlockBraces: Space missing inside }.","created_at":"2018-06-03T20:57:46Z","updated_at":"2018-06-03T20:57:47Z","html_url":"https://github.com/SSchwartz214/black_thursday/pull/16#discussion_r192602168","pull_request_url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/comments/192602168"},"html":{"href":"https://github.com/SSchwartz214/black_thursday/pull/16#discussion_r192602168"},"pull_request":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16","id":192267004,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjY3MDA0","html_url":"https://github.com/SSchwartz214/black_thursday/pull/16","diff_url":"https://github.com/SSchwartz214/black_thursday/pull/16.diff","patch_url":"https://github.com/SSchwartz214/black_thursday/pull/16.patch","issue_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/16","number":16,"state":"open","locked":false,"title":"Refactor","user":{"login":"SSchwartz214","id":30695131,"node_id":"MDQ6VXNlcjMwNjk1MTMx","avatar_url":"https://avatars2.githubusercontent.com/u/30695131?v=4","gravatar_id":"","url":"https://api.github.com/users/SSchwartz214","html_url":"https://github.com/SSchwartz214","followers_url":"https://api.github.com/users/SSchwartz214/followers","following_url":"https://api.github.com/users/SSchwartz214/following{/other_user}","gists_url":"https://api.github.com/users/SSchwartz214/gists{/gist_id}","starred_url":"https://api.github.com/users/SSchwartz214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSchwartz214/subscriptions","organizations_url":"https://api.github.com/users/SSchwartz214/orgs","repos_url":"https://api.github.com/users/SSchwartz214/repos","events_url":"https://api.github.com/users/SSchwartz214/events{/privacy}","received_events_url":"https://api.github.com/users/SSchwartz214/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-03T20:57:31Z","updated_at":"2018-06-03T20:57:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9217d44d40ce8359e23c8d3d64ba31d22c695ea6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16/commits","review_comments_url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16/comments","review_comment_url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/16/comments","statuses_url":"https://api.github.com/repos/SSchwartz214/black_thursday/statuses/4c8d1beeadc9a194090345f56face6188ed082f8","head":{"label":"SSchwartz214:refactor","ref":"refactor","sha":"4c8d1beeadc9a194090345f56face6188ed082f8","user":{"login":"SSchwartz214","id":30695131,"node_id":"MDQ6VXNlcjMwNjk1MTMx","avatar_url":"https://avatars2.githubusercontent.com/u/30695131?v=4","gravatar_id":"","url":"https://api.github.com/users/SSchwartz214","html_url":"https://github.com/SSchwartz214","followers_url":"https://api.github.com/users/SSchwartz214/followers","following_url":"https://api.github.com/users/SSchwartz214/following{/other_user}","gists_url":"https://api.github.com/users/SSchwartz214/gists{/gist_id}","starred_url":"https://api.github.com/users/SSchwartz214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSchwartz214/subscriptions","organizations_url":"https://api.github.com/users/SSchwartz214/orgs","repos_url":"https://api.github.com/users/SSchwartz214/repos","events_url":"https://api.github.com/users/SSchwartz214/events{/privacy}","received_events_url":"https://api.github.com/users/SSchwartz214/received_events","type":"User","site_admin":false},"repo":{"id":134908699,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ5MDg2OTk=","name":"black_thursday","full_name":"SSchwartz214/black_thursday","owner":{"login":"SSchwartz214","id":30695131,"node_id":"MDQ6VXNlcjMwNjk1MTMx","avatar_url":"https://avatars2.githubusercontent.com/u/30695131?v=4","gravatar_id":"","url":"https://api.github.com/users/SSchwartz214","html_url":"https://github.com/SSchwartz214","followers_url":"https://api.github.com/users/SSchwartz214/followers","following_url":"https://api.github.com/users/SSchwartz214/following{/other_user}","gists_url":"https://api.github.com/users/SSchwartz214/gists{/gist_id}","starred_url":"https://api.github.com/users/SSchwartz214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSchwartz214/subscriptions","organizations_url":"https://api.github.com/users/SSchwartz214/orgs","repos_url":"https://api.github.com/users/SSchwartz214/repos","events_url":"https://api.github.com/users/SSchwartz214/events{/privacy}","received_events_url":"https://api.github.com/users/SSchwartz214/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SSchwartz214/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/SSchwartz214/black_thursday","forks_url":"https://api.github.com/repos/SSchwartz214/black_thursday/forks","keys_url":"https://api.github.com/repos/SSchwartz214/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SSchwartz214/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SSchwartz214/black_thursday/teams","hooks_url":"https://api.github.com/repos/SSchwartz214/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/SSchwartz214/black_thursday/events","assignees_url":"https://api.github.com/repos/SSchwartz214/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/SSchwartz214/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/SSchwartz214/black_thursday/tags","blobs_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SSchwartz214/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/SSchwartz214/black_thursday/languages","stargazers_url":"https://api.github.com/repos/SSchwartz214/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/SSchwartz214/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/SSchwartz214/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/SSchwartz214/black_thursday/subscription","commits_url":"https://api.github.com/repos/SSchwartz214/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/SSchwartz214/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/SSchwartz214/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/SSchwartz214/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SSchwartz214/black_thursday/merges","archive_url":"https://api.github.com/repos/SSchwartz214/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SSchwartz214/black_thursday/downloads","issues_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/SSchwartz214/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/SSchwartz214/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SSchwartz214/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/SSchwartz214/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/SSchwartz214/black_thursday/deployments","created_at":"2018-05-25T22:02:59Z","updated_at":"2018-06-03T03:27:01Z","pushed_at":"2018-06-03T20:57:32Z","git_url":"git://github.com/SSchwartz214/black_thursday.git","ssh_url":"git@github.com:SSchwartz214/black_thursday.git","clone_url":"https://github.com/SSchwartz214/black_thursday.git","svn_url":"https://github.com/SSchwartz214/black_thursday","homepage":null,"size":1754,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SSchwartz214:master","ref":"master","sha":"00f4c86706d42a3bc6e6baa01f1a51996ae62d3a","user":{"login":"SSchwartz214","id":30695131,"node_id":"MDQ6VXNlcjMwNjk1MTMx","avatar_url":"https://avatars2.githubusercontent.com/u/30695131?v=4","gravatar_id":"","url":"https://api.github.com/users/SSchwartz214","html_url":"https://github.com/SSchwartz214","followers_url":"https://api.github.com/users/SSchwartz214/followers","following_url":"https://api.github.com/users/SSchwartz214/following{/other_user}","gists_url":"https://api.github.com/users/SSchwartz214/gists{/gist_id}","starred_url":"https://api.github.com/users/SSchwartz214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSchwartz214/subscriptions","organizations_url":"https://api.github.com/users/SSchwartz214/orgs","repos_url":"https://api.github.com/users/SSchwartz214/repos","events_url":"https://api.github.com/users/SSchwartz214/events{/privacy}","received_events_url":"https://api.github.com/users/SSchwartz214/received_events","type":"User","site_admin":false},"repo":{"id":134908699,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ5MDg2OTk=","name":"black_thursday","full_name":"SSchwartz214/black_thursday","owner":{"login":"SSchwartz214","id":30695131,"node_id":"MDQ6VXNlcjMwNjk1MTMx","avatar_url":"https://avatars2.githubusercontent.com/u/30695131?v=4","gravatar_id":"","url":"https://api.github.com/users/SSchwartz214","html_url":"https://github.com/SSchwartz214","followers_url":"https://api.github.com/users/SSchwartz214/followers","following_url":"https://api.github.com/users/SSchwartz214/following{/other_user}","gists_url":"https://api.github.com/users/SSchwartz214/gists{/gist_id}","starred_url":"https://api.github.com/users/SSchwartz214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSchwartz214/subscriptions","organizations_url":"https://api.github.com/users/SSchwartz214/orgs","repos_url":"https://api.github.com/users/SSchwartz214/repos","events_url":"https://api.github.com/users/SSchwartz214/events{/privacy}","received_events_url":"https://api.github.com/users/SSchwartz214/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SSchwartz214/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/SSchwartz214/black_thursday","forks_url":"https://api.github.com/repos/SSchwartz214/black_thursday/forks","keys_url":"https://api.github.com/repos/SSchwartz214/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SSchwartz214/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SSchwartz214/black_thursday/teams","hooks_url":"https://api.github.com/repos/SSchwartz214/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/SSchwartz214/black_thursday/events","assignees_url":"https://api.github.com/repos/SSchwartz214/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/SSchwartz214/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/SSchwartz214/black_thursday/tags","blobs_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SSchwartz214/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/SSchwartz214/black_thursday/languages","stargazers_url":"https://api.github.com/repos/SSchwartz214/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/SSchwartz214/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/SSchwartz214/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/SSchwartz214/black_thursday/subscription","commits_url":"https://api.github.com/repos/SSchwartz214/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/SSchwartz214/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/SSchwartz214/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/SSchwartz214/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/SSchwartz214/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SSchwartz214/black_thursday/merges","archive_url":"https://api.github.com/repos/SSchwartz214/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SSchwartz214/black_thursday/downloads","issues_url":"https://api.github.com/repos/SSchwartz214/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/SSchwartz214/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/SSchwartz214/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SSchwartz214/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/SSchwartz214/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/SSchwartz214/black_thursday/deployments","created_at":"2018-05-25T22:02:59Z","updated_at":"2018-06-03T03:27:01Z","pushed_at":"2018-06-03T20:57:32Z","git_url":"git://github.com/SSchwartz214/black_thursday.git","ssh_url":"git@github.com:SSchwartz214/black_thursday.git","clone_url":"https://github.com/SSchwartz214/black_thursday.git","svn_url":"https://github.com/SSchwartz214/black_thursday","homepage":null,"size":1754,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16"},"html":{"href":"https://github.com/SSchwartz214/black_thursday/pull/16"},"issue":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/16"},"comments":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/SSchwartz214/black_thursday/statuses/4c8d1beeadc9a194090345f56face6188ed082f8"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}