{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/gladiator/pulls/comments/62215736","id":62215736,"diff_hunk":"@@ -495,4 +495,32 @@ public function addUserToModel($model, $id, $user)\n \n         return true;\n     }\n+\n+    /**\n+     * Fires off an event to send an email a user.\n+     *\n+     * @param  Gladiator\\Models\\User     $user\n+     * @param  Gladiator\\Models\\Contest  $contest\n+     * @param  array $params\n+     */","path":"app/Services/Manager.php","position":11,"original_position":11,"commit_id":"40efb3fe28c8335d9f66c665fdc1aac02fd87ce6","original_commit_id":"40efb3fe28c8335d9f66c665fdc1aac02fd87ce6","user":{"login":"weerd","id":105849,"avatar_url":"https://avatars.githubusercontent.com/u/105849?v=3","gravatar_id":"","url":"https://api.github.com/users/weerd","html_url":"https://github.com/weerd","followers_url":"https://api.github.com/users/weerd/followers","following_url":"https://api.github.com/users/weerd/following{/other_user}","gists_url":"https://api.github.com/users/weerd/gists{/gist_id}","starred_url":"https://api.github.com/users/weerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weerd/subscriptions","organizations_url":"https://api.github.com/users/weerd/orgs","repos_url":"https://api.github.com/users/weerd/repos","events_url":"https://api.github.com/users/weerd/events{/privacy}","received_events_url":"https://api.github.com/users/weerd/received_events","type":"User","site_admin":false},"body":"add a `@return void` :)","created_at":"2016-05-05T16:48:01Z","updated_at":"2016-05-05T16:48:01Z","html_url":"https://github.com/DoSomething/gladiator/pull/304#discussion_r62215736","pull_request_url":"https://api.github.com/repos/DoSomething/gladiator/pulls/304","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/gladiator/pulls/comments/62215736"},"html":{"href":"https://github.com/DoSomething/gladiator/pull/304#discussion_r62215736"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/gladiator/pulls/304"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/gladiator/pulls/304","id":69029066,"html_url":"https://github.com/DoSomething/gladiator/pull/304","diff_url":"https://github.com/DoSomething/gladiator/pull/304.diff","patch_url":"https://github.com/DoSomething/gladiator/pull/304.patch","issue_url":"https://api.github.com/repos/DoSomething/gladiator/issues/304","number":304,"state":"open","locked":false,"title":"Welcome email take 2","user":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\n\r\n* Created a failed jobs table migration that logs failed queue jobs after they have reached the limit of attempts **(now limited to 3 attempts instead of infinity, like before)**\r\n\r\n* Creates a `sendEmail()` function to send one off emails and we use that in the api `UsersController` to send of the welcome emails. I think there were issues with us setting the `$user` variable as a northstar object before returning, so this separates the concerns better. \r\n\r\n#### How should this be manually tested?\r\n\r\nPull down branch, wipe and reset database, make a request to add a user and it should work, and that user should get a welcome email. \r\n\r\n#### What are the relevant tickets?\r\n\r\nAddresses #292 ","created_at":"2016-05-05T16:07:32Z","updated_at":"2016-05-05T16:48:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"358ddd765872259347c237e75bec9bcfc2d5950b","assignee":{"login":"weerd","id":105849,"avatar_url":"https://avatars.githubusercontent.com/u/105849?v=3","gravatar_id":"","url":"https://api.github.com/users/weerd","html_url":"https://github.com/weerd","followers_url":"https://api.github.com/users/weerd/followers","following_url":"https://api.github.com/users/weerd/following{/other_user}","gists_url":"https://api.github.com/users/weerd/gists{/gist_id}","starred_url":"https://api.github.com/users/weerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weerd/subscriptions","organizations_url":"https://api.github.com/users/weerd/orgs","repos_url":"https://api.github.com/users/weerd/repos","events_url":"https://api.github.com/users/weerd/events{/privacy}","received_events_url":"https://api.github.com/users/weerd/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/gladiator/pulls/304/commits","review_comments_url":"https://api.github.com/repos/DoSomething/gladiator/pulls/304/comments","review_comment_url":"https://api.github.com/repos/DoSomething/gladiator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/gladiator/issues/304/comments","statuses_url":"https://api.github.com/repos/DoSomething/gladiator/statuses/40efb3fe28c8335d9f66c665fdc1aac02fd87ce6","head":{"label":"DoSomething:welcome-email-take-2","ref":"welcome-email-take-2","sha":"40efb3fe28c8335d9f66c665fdc1aac02fd87ce6","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":51176505,"name":"gladiator","full_name":"DoSomething/gladiator","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/gladiator","description":"The DoSomething.org Competitions Platform","fork":false,"url":"https://api.github.com/repos/DoSomething/gladiator","forks_url":"https://api.github.com/repos/DoSomething/gladiator/forks","keys_url":"https://api.github.com/repos/DoSomething/gladiator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/gladiator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/gladiator/teams","hooks_url":"https://api.github.com/repos/DoSomething/gladiator/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/gladiator/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/gladiator/events","assignees_url":"https://api.github.com/repos/DoSomething/gladiator/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/gladiator/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/gladiator/tags","blobs_url":"https://api.github.com/repos/DoSomething/gladiator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/gladiator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/gladiator/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/gladiator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/gladiator/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/gladiator/languages","stargazers_url":"https://api.github.com/repos/DoSomething/gladiator/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/gladiator/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/gladiator/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/gladiator/subscription","commits_url":"https://api.github.com/repos/DoSomething/gladiator/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/gladiator/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/gladiator/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/gladiator/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/gladiator/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/gladiator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/gladiator/merges","archive_url":"https://api.github.com/repos/DoSomething/gladiator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/gladiator/downloads","issues_url":"https://api.github.com/repos/DoSomething/gladiator/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/gladiator/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/gladiator/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/gladiator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/gladiator/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/gladiator/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/gladiator/deployments","created_at":"2016-02-05T21:53:32Z","updated_at":"2016-02-05T22:11:13Z","pushed_at":"2016-05-05T16:38:38Z","git_url":"git://github.com/DoSomething/gladiator.git","ssh_url":"git@github.com:DoSomething/gladiator.git","clone_url":"https://github.com/DoSomething/gladiator.git","svn_url":"https://github.com/DoSomething/gladiator","homepage":null,"size":817,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":0,"default_branch":"master"}},"base":{"label":"DoSomething:master","ref":"master","sha":"9e9a5bc3cd7c8adb7a94801bdb41cd35f73f8684","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":51176505,"name":"gladiator","full_name":"DoSomething/gladiator","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/gladiator","description":"The DoSomething.org Competitions Platform","fork":false,"url":"https://api.github.com/repos/DoSomething/gladiator","forks_url":"https://api.github.com/repos/DoSomething/gladiator/forks","keys_url":"https://api.github.com/repos/DoSomething/gladiator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/gladiator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/gladiator/teams","hooks_url":"https://api.github.com/repos/DoSomething/gladiator/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/gladiator/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/gladiator/events","assignees_url":"https://api.github.com/repos/DoSomething/gladiator/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/gladiator/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/gladiator/tags","blobs_url":"https://api.github.com/repos/DoSomething/gladiator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/gladiator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/gladiator/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/gladiator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/gladiator/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/gladiator/languages","stargazers_url":"https://api.github.com/repos/DoSomething/gladiator/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/gladiator/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/gladiator/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/gladiator/subscription","commits_url":"https://api.github.com/repos/DoSomething/gladiator/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/gladiator/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/gladiator/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/gladiator/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/gladiator/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/gladiator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/gladiator/merges","archive_url":"https://api.github.com/repos/DoSomething/gladiator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/gladiator/downloads","issues_url":"https://api.github.com/repos/DoSomething/gladiator/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/gladiator/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/gladiator/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/gladiator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/gladiator/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/gladiator/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/gladiator/deployments","created_at":"2016-02-05T21:53:32Z","updated_at":"2016-02-05T22:11:13Z","pushed_at":"2016-05-05T16:38:38Z","git_url":"git://github.com/DoSomething/gladiator.git","ssh_url":"git@github.com:DoSomething/gladiator.git","clone_url":"https://github.com/DoSomething/gladiator.git","svn_url":"https://github.com/DoSomething/gladiator","homepage":null,"size":817,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/gladiator/pulls/304"},"html":{"href":"https://github.com/DoSomething/gladiator/pull/304"},"issue":{"href":"https://api.github.com/repos/DoSomething/gladiator/issues/304"},"comments":{"href":"https://api.github.com/repos/DoSomething/gladiator/issues/304/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/gladiator/pulls/304/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/gladiator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/gladiator/pulls/304/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/gladiator/statuses/40efb3fe28c8335d9f66c665fdc1aac02fd87ce6"}}}}