{"action":"created","comment":{"url":"https://api.github.com/repos/neontribe/ARCVService/pulls/comments/223622526","pull_request_review_id":162789996,"id":223622526,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzYyMjUyNg==","diff_hunk":"@@ -53,9 +57,100 @@ class Bundle extends Model\n     protected $dates = [\n         'created_at',\n         'updated_at',\n-        'allocated_at'  // When it was handed out.\n+        'disbursed_at'  // When it was handed out.\n     ];\n \n+    /**\n+     * Refactored function that works out if we broke anything then adds vouchers.\n+     *\n+     * @param Collection $vouchers\n+     * @param array $codes\n+     * @param Bundle|null $bundle\n+     * @return array\n+     */\n+    private function alterVouchers(Collection $vouchers, array $codes, Bundle $bundle = null)\n+    {\n+        $errors = [];\n+        $badCodes = array_diff($vouchers->pluck(\"code\")->toArray(), $codes);\n+\n+        if (!isEmpty($badCodes)) {\n+            //Stop! report the bad codes!\n+            $errors[\"codes\"] = (array_key_exists(\"badCodes\", $errors))","path":"app/Bundle.php","position":44,"original_position":44,"commit_id":"c493d65494cf02197885256830d3b5cebc9c55fc","original_commit_id":"c493d65494cf02197885256830d3b5cebc9c55fc","user":{"login":"katjam","id":861172,"node_id":"MDQ6VXNlcjg2MTE3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/861172?v=4","gravatar_id":"","url":"https://api.github.com/users/katjam","html_url":"https://github.com/katjam","followers_url":"https://api.github.com/users/katjam/followers","following_url":"https://api.github.com/users/katjam/following{/other_user}","gists_url":"https://api.github.com/users/katjam/gists{/gist_id}","starred_url":"https://api.github.com/users/katjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katjam/subscriptions","organizations_url":"https://api.github.com/users/katjam/orgs","repos_url":"https://api.github.com/users/katjam/repos","events_url":"https://api.github.com/users/katjam/events{/privacy}","received_events_url":"https://api.github.com/users/katjam/received_events","type":"User","site_admin":false},"body":"Won't `$errors` always be `[]` here?","created_at":"2018-10-09T09:25:38Z","updated_at":"2018-10-09T09:56:58Z","html_url":"https://github.com/neontribe/ARCVService/pull/170#discussion_r223622526","pull_request_url":"https://api.github.com/repos/neontribe/ARCVService/pulls/170","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/neontribe/ARCVService/pulls/comments/223622526"},"html":{"href":"https://github.com/neontribe/ARCVService/pull/170#discussion_r223622526"},"pull_request":{"href":"https://api.github.com/repos/neontribe/ARCVService/pulls/170"}}},"pull_request":{"url":"https://api.github.com/repos/neontribe/ARCVService/pulls/170","id":221353456,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMzUzNDU2","html_url":"https://github.com/neontribe/ARCVService/pull/170","diff_url":"https://github.com/neontribe/ARCVService/pull/170.diff","patch_url":"https://github.com/neontribe/ARCVService/pull/170.patch","issue_url":"https://api.github.com/repos/neontribe/ARCVService/issues/170","number":170,"state":"open","locked":false,"title":"1.3/1044 create a voucher collection page","user":{"login":"charlesstrange2","id":25037036,"node_id":"MDQ6VXNlcjI1MDM3MDM2","avatar_url":"https://avatars3.githubusercontent.com/u/25037036?v=4","gravatar_id":"","url":"https://api.github.com/users/charlesstrange2","html_url":"https://github.com/charlesstrange2","followers_url":"https://api.github.com/users/charlesstrange2/followers","following_url":"https://api.github.com/users/charlesstrange2/following{/other_user}","gists_url":"https://api.github.com/users/charlesstrange2/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesstrange2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesstrange2/subscriptions","organizations_url":"https://api.github.com/users/charlesstrange2/orgs","repos_url":"https://api.github.com/users/charlesstrange2/repos","events_url":"https://api.github.com/users/charlesstrange2/events{/privacy}","received_events_url":"https://api.github.com/users/charlesstrange2/received_events","type":"User","site_admin":false},"body":"It needs tests.\r\nIt needs a PUT route.\r\n\r\nCan you let me know if the approach looks good?","created_at":"2018-10-09T08:43:00Z","updated_at":"2018-10-09T09:56:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da81df0dfbdc8f4acb468b893325260cd29dc435","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/neontribe/ARCVService/pulls/170/commits","review_comments_url":"https://api.github.com/repos/neontribe/ARCVService/pulls/170/comments","review_comment_url":"https://api.github.com/repos/neontribe/ARCVService/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neontribe/ARCVService/issues/170/comments","statuses_url":"https://api.github.com/repos/neontribe/ARCVService/statuses/c493d65494cf02197885256830d3b5cebc9c55fc","head":{"label":"neontribe:1.3/1044-create-a-voucher-collection-page","ref":"1.3/1044-create-a-voucher-collection-page","sha":"c493d65494cf02197885256830d3b5cebc9c55fc","user":{"login":"neontribe","id":814085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgxNDA4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/814085?v=4","gravatar_id":"","url":"https://api.github.com/users/neontribe","html_url":"https://github.com/neontribe","followers_url":"https://api.github.com/users/neontribe/followers","following_url":"https://api.github.com/users/neontribe/following{/other_user}","gists_url":"https://api.github.com/users/neontribe/gists{/gist_id}","starred_url":"https://api.github.com/users/neontribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neontribe/subscriptions","organizations_url":"https://api.github.com/users/neontribe/orgs","repos_url":"https://api.github.com/users/neontribe/repos","events_url":"https://api.github.com/users/neontribe/events{/privacy}","received_events_url":"https://api.github.com/users/neontribe/received_events","type":"Organization","site_admin":false},"repo":{"id":88754893,"node_id":"MDEwOlJlcG9zaXRvcnk4ODc1NDg5Mw==","name":"ARCVService","full_name":"neontribe/ARCVService","private":false,"owner":{"login":"neontribe","id":814085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgxNDA4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/814085?v=4","gravatar_id":"","url":"https://api.github.com/users/neontribe","html_url":"https://github.com/neontribe","followers_url":"https://api.github.com/users/neontribe/followers","following_url":"https://api.github.com/users/neontribe/following{/other_user}","gists_url":"https://api.github.com/users/neontribe/gists{/gist_id}","starred_url":"https://api.github.com/users/neontribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neontribe/subscriptions","organizations_url":"https://api.github.com/users/neontribe/orgs","repos_url":"https://api.github.com/users/neontribe/repos","events_url":"https://api.github.com/users/neontribe/events{/privacy}","received_events_url":"https://api.github.com/users/neontribe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/neontribe/ARCVService","description":"ARC Voucher Service/API","fork":false,"url":"https://api.github.com/repos/neontribe/ARCVService","forks_url":"https://api.github.com/repos/neontribe/ARCVService/forks","keys_url":"https://api.github.com/repos/neontribe/ARCVService/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neontribe/ARCVService/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neontribe/ARCVService/teams","hooks_url":"https://api.github.com/repos/neontribe/ARCVService/hooks","issue_events_url":"https://api.github.com/repos/neontribe/ARCVService/issues/events{/number}","events_url":"https://api.github.com/repos/neontribe/ARCVService/events","assignees_url":"https://api.github.com/repos/neontribe/ARCVService/assignees{/user}","branches_url":"https://api.github.com/repos/neontribe/ARCVService/branches{/branch}","tags_url":"https://api.github.com/repos/neontribe/ARCVService/tags","blobs_url":"https://api.github.com/repos/neontribe/ARCVService/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neontribe/ARCVService/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neontribe/ARCVService/git/refs{/sha}","trees_url":"https://api.github.com/repos/neontribe/ARCVService/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neontribe/ARCVService/statuses/{sha}","languages_url":"https://api.github.com/repos/neontribe/ARCVService/languages","stargazers_url":"https://api.github.com/repos/neontribe/ARCVService/stargazers","contributors_url":"https://api.github.com/repos/neontribe/ARCVService/contributors","subscribers_url":"https://api.github.com/repos/neontribe/ARCVService/subscribers","subscription_url":"https://api.github.com/repos/neontribe/ARCVService/subscription","commits_url":"https://api.github.com/repos/neontribe/ARCVService/commits{/sha}","git_commits_url":"https://api.github.com/repos/neontribe/ARCVService/git/commits{/sha}","comments_url":"https://api.github.com/repos/neontribe/ARCVService/comments{/number}","issue_comment_url":"https://api.github.com/repos/neontribe/ARCVService/issues/comments{/number}","contents_url":"https://api.github.com/repos/neontribe/ARCVService/contents/{+path}","compare_url":"https://api.github.com/repos/neontribe/ARCVService/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neontribe/ARCVService/merges","archive_url":"https://api.github.com/repos/neontribe/ARCVService/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neontribe/ARCVService/downloads","issues_url":"https://api.github.com/repos/neontribe/ARCVService/issues{/number}","pulls_url":"https://api.github.com/repos/neontribe/ARCVService/pulls{/number}","milestones_url":"https://api.github.com/repos/neontribe/ARCVService/milestones{/number}","notifications_url":"https://api.github.com/repos/neontribe/ARCVService/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neontribe/ARCVService/labels{/name}","releases_url":"https://api.github.com/repos/neontribe/ARCVService/releases{/id}","deployments_url":"https://api.github.com/repos/neontribe/ARCVService/deployments","created_at":"2017-04-19T14:31:12Z","updated_at":"2018-10-09T09:05:01Z","pushed_at":"2018-10-09T09:52:11Z","git_url":"git://github.com/neontribe/ARCVService.git","ssh_url":"git@github.com:neontribe/ARCVService.git","clone_url":"https://github.com/neontribe/ARCVService.git","svn_url":"https://github.com/neontribe/ARCVService","homepage":null,"size":3206,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"1.3/release"}},"base":{"label":"neontribe:1.3/release","ref":"1.3/release","sha":"9b55b43789a2e942052de42f19c7ccc6515170b4","user":{"login":"neontribe","id":814085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgxNDA4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/814085?v=4","gravatar_id":"","url":"https://api.github.com/users/neontribe","html_url":"https://github.com/neontribe","followers_url":"https://api.github.com/users/neontribe/followers","following_url":"https://api.github.com/users/neontribe/following{/other_user}","gists_url":"https://api.github.com/users/neontribe/gists{/gist_id}","starred_url":"https://api.github.com/users/neontribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neontribe/subscriptions","organizations_url":"https://api.github.com/users/neontribe/orgs","repos_url":"https://api.github.com/users/neontribe/repos","events_url":"https://api.github.com/users/neontribe/events{/privacy}","received_events_url":"https://api.github.com/users/neontribe/received_events","type":"Organization","site_admin":false},"repo":{"id":88754893,"node_id":"MDEwOlJlcG9zaXRvcnk4ODc1NDg5Mw==","name":"ARCVService","full_name":"neontribe/ARCVService","private":false,"owner":{"login":"neontribe","id":814085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgxNDA4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/814085?v=4","gravatar_id":"","url":"https://api.github.com/users/neontribe","html_url":"https://github.com/neontribe","followers_url":"https://api.github.com/users/neontribe/followers","following_url":"https://api.github.com/users/neontribe/following{/other_user}","gists_url":"https://api.github.com/users/neontribe/gists{/gist_id}","starred_url":"https://api.github.com/users/neontribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neontribe/subscriptions","organizations_url":"https://api.github.com/users/neontribe/orgs","repos_url":"https://api.github.com/users/neontribe/repos","events_url":"https://api.github.com/users/neontribe/events{/privacy}","received_events_url":"https://api.github.com/users/neontribe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/neontribe/ARCVService","description":"ARC Voucher Service/API","fork":false,"url":"https://api.github.com/repos/neontribe/ARCVService","forks_url":"https://api.github.com/repos/neontribe/ARCVService/forks","keys_url":"https://api.github.com/repos/neontribe/ARCVService/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neontribe/ARCVService/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neontribe/ARCVService/teams","hooks_url":"https://api.github.com/repos/neontribe/ARCVService/hooks","issue_events_url":"https://api.github.com/repos/neontribe/ARCVService/issues/events{/number}","events_url":"https://api.github.com/repos/neontribe/ARCVService/events","assignees_url":"https://api.github.com/repos/neontribe/ARCVService/assignees{/user}","branches_url":"https://api.github.com/repos/neontribe/ARCVService/branches{/branch}","tags_url":"https://api.github.com/repos/neontribe/ARCVService/tags","blobs_url":"https://api.github.com/repos/neontribe/ARCVService/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neontribe/ARCVService/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neontribe/ARCVService/git/refs{/sha}","trees_url":"https://api.github.com/repos/neontribe/ARCVService/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neontribe/ARCVService/statuses/{sha}","languages_url":"https://api.github.com/repos/neontribe/ARCVService/languages","stargazers_url":"https://api.github.com/repos/neontribe/ARCVService/stargazers","contributors_url":"https://api.github.com/repos/neontribe/ARCVService/contributors","subscribers_url":"https://api.github.com/repos/neontribe/ARCVService/subscribers","subscription_url":"https://api.github.com/repos/neontribe/ARCVService/subscription","commits_url":"https://api.github.com/repos/neontribe/ARCVService/commits{/sha}","git_commits_url":"https://api.github.com/repos/neontribe/ARCVService/git/commits{/sha}","comments_url":"https://api.github.com/repos/neontribe/ARCVService/comments{/number}","issue_comment_url":"https://api.github.com/repos/neontribe/ARCVService/issues/comments{/number}","contents_url":"https://api.github.com/repos/neontribe/ARCVService/contents/{+path}","compare_url":"https://api.github.com/repos/neontribe/ARCVService/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neontribe/ARCVService/merges","archive_url":"https://api.github.com/repos/neontribe/ARCVService/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neontribe/ARCVService/downloads","issues_url":"https://api.github.com/repos/neontribe/ARCVService/issues{/number}","pulls_url":"https://api.github.com/repos/neontribe/ARCVService/pulls{/number}","milestones_url":"https://api.github.com/repos/neontribe/ARCVService/milestones{/number}","notifications_url":"https://api.github.com/repos/neontribe/ARCVService/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neontribe/ARCVService/labels{/name}","releases_url":"https://api.github.com/repos/neontribe/ARCVService/releases{/id}","deployments_url":"https://api.github.com/repos/neontribe/ARCVService/deployments","created_at":"2017-04-19T14:31:12Z","updated_at":"2018-10-09T09:05:01Z","pushed_at":"2018-10-09T09:52:11Z","git_url":"git://github.com/neontribe/ARCVService.git","ssh_url":"git@github.com:neontribe/ARCVService.git","clone_url":"https://github.com/neontribe/ARCVService.git","svn_url":"https://github.com/neontribe/ARCVService","homepage":null,"size":3206,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"1.3/release"}},"_links":{"self":{"href":"https://api.github.com/repos/neontribe/ARCVService/pulls/170"},"html":{"href":"https://github.com/neontribe/ARCVService/pull/170"},"issue":{"href":"https://api.github.com/repos/neontribe/ARCVService/issues/170"},"comments":{"href":"https://api.github.com/repos/neontribe/ARCVService/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/neontribe/ARCVService/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/neontribe/ARCVService/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neontribe/ARCVService/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/neontribe/ARCVService/statuses/c493d65494cf02197885256830d3b5cebc9c55fc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"katjam"}}