payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/comments/341887435","pull_request_review_id":310857728,"id":341887435,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MTg4NzQzNQ==","diff_hunk":"@@ -0,0 +1,133 @@\n+const { Season, SeasonPerson, Team, sequelize } = require('../../sequelize/models');\n+const { AuthUtils, EmailUtils } = require('../../../utilities');\n+\n+\n+\n+async function getJoinLink(person){\n+  if( person.auth && person.auth.pass_hash ){\n+    return `${process.env.APP_URL}/login`;\n+  } else {\n+    const expirationTime = person.auth && person.auth.verification_token_expiration;\n+    const needsVerification = !expirationTime || expirationTime.getTime() < Date.now()\n+  \n+    if( needsVerification ){\n+      const [ auth, verification_token ] = AuthUtils.generateEmailToken(person.email);\n+\n+      person = await PersonAuth.update(\n+        auth, {\n+          where: {\n+            id: person.id\n+          }\n+        }\n+      );\n+\n+      return `${process.env.APP_URL}/join?vt=${verification_token}&email=${person.email}`;\n+    } else {\n+      return `${process.env.APP_URL}/join`;\n+    }\n+  }","path":"server/controllers/SeasonController/addPeople.js","position":28,"original_position":28,"commit_id":"23db38bad8d0e6e60c87b0dcbb5319bed2ab7217","original_commit_id":"23db38bad8d0e6e60c87b0dcbb5319bed2ab7217","user":{"login":"mienaikoe","id":3875239,"node_id":"MDQ6VXNlcjM4NzUyMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/3875239?v=4","gravatar_id":"","url":"https://api.github.com/users/mienaikoe","html_url":"https://github.com/mienaikoe","followers_url":"https://api.github.com/users/mienaikoe/followers","following_url":"https://api.github.com/users/mienaikoe/following{/other_user}","gists_url":"https://api.github.com/users/mienaikoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mienaikoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mienaikoe/subscriptions","organizations_url":"https://api.github.com/users/mienaikoe/orgs","repos_url":"https://api.github.com/users/mienaikoe/repos","events_url":"https://api.github.com/users/mienaikoe/events{/privacy}","received_events_url":"https://api.github.com/users/mienaikoe/received_events","type":"User","site_admin":false},"body":"Inner if statement is unnecessary because verification expiration should never exist if there is no passhash","created_at":"2019-11-04T01:41:21Z","updated_at":"2019-11-04T01:41:21Z","html_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush/pull/151#discussion_r341887435","pull_request_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/comments/341887435"},"html":{"href":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush/pull/151#discussion_r341887435"},"pull_request":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151"}},"in_reply_to_id":341835060},"pull_request":{"url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151","id":334023207,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM0MDIzMjA3","html_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush/pull/151","diff_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush/pull/151.diff","patch_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush/pull/151.patch","issue_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/151","number":151,"state":"open","locked":false,"title":"Sequelize TeamController and SeasonController","user":{"login":"mienaikoe","id":3875239,"node_id":"MDQ6VXNlcjM4NzUyMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/3875239?v=4","gravatar_id":"","url":"https://api.github.com/users/mienaikoe","html_url":"https://github.com/mienaikoe","followers_url":"https://api.github.com/users/mienaikoe/followers","following_url":"https://api.github.com/users/mienaikoe/following{/other_user}","gists_url":"https://api.github.com/users/mienaikoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mienaikoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mienaikoe/subscriptions","organizations_url":"https://api.github.com/users/mienaikoe/orgs","repos_url":"https://api.github.com/users/mienaikoe/repos","events_url":"https://api.github.com/users/mienaikoe/events{/privacy}","received_events_url":"https://api.github.com/users/mienaikoe/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-10-30T04:47:25Z","updated_at":"2019-11-04T01:41:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e7179b3433be73de864dde7f3acb785c5d2c091","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151/commits","review_comments_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151/comments","review_comment_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/151/comments","statuses_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/statuses/23db38bad8d0e6e60c87b0dcbb5319bed2ab7217","head":{"label":"mighty-speed-krush:team-controller","ref":"team-controller","sha":"23db38bad8d0e6e60c87b0dcbb5319bed2ab7217","user":{"login":"mighty-speed-krush","id":47199449,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MTk5NDQ5","avatar_url":"https://avatars2.githubusercontent.com/u/47199449?v=4","gravatar_id":"","url":"https://api.github.com/users/mighty-speed-krush","html_url":"https://github.com/mighty-speed-krush","followers_url":"https://api.github.com/users/mighty-speed-krush/followers","following_url":"https://api.github.com/users/mighty-speed-krush/following{/other_user}","gists_url":"https://api.github.com/users/mighty-speed-krush/gists{/gist_id}","starred_url":"https://api.github.com/users/mighty-speed-krush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mighty-speed-krush/subscriptions","organizations_url":"https://api.github.com/users/mighty-speed-krush/orgs","repos_url":"https://api.github.com/users/mighty-speed-krush/repos","events_url":"https://api.github.com/users/mighty-speed-krush/events{/privacy}","received_events_url":"https://api.github.com/users/mighty-speed-krush/received_events","type":"Organization","site_admin":false},"repo":{"id":160095567,"node_id":"MDEwOlJlcG9zaXRvcnkxNjAwOTU1Njc=","name":"Mighty-Speed-Krush","full_name":"mighty-speed-krush/Mighty-Speed-Krush","private":false,"owner":{"login":"mighty-speed-krush","id":47199449,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MTk5NDQ5","avatar_url":"https://avatars2.githubusercontent.com/u/47199449?v=4","gravatar_id":"","url":"https://api.github.com/users/mighty-speed-krush","html_url":"https://github.com/mighty-speed-krush","followers_url":"https://api.github.com/users/mighty-speed-krush/followers","following_url":"https://api.github.com/users/mighty-speed-krush/following{/other_user}","gists_url":"https://api.github.com/users/mighty-speed-krush/gists{/gist_id}","starred_url":"https://api.github.com/users/mighty-speed-krush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mighty-speed-krush/subscriptions","organizations_url":"https://api.github.com/users/mighty-speed-krush/orgs","repos_url":"https://api.github.com/users/mighty-speed-krush/repos","events_url":"https://api.github.com/users/mighty-speed-krush/events{/privacy}","received_events_url":"https://api.github.com/users/mighty-speed-krush/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush","description":null,"fork":false,"url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush","forks_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/forks","keys_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/teams","hooks_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/hooks","issue_events_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/events{/number}","events_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/events","assignees_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/assignees{/user}","branches_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/branches{/branch}","tags_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/tags","blobs_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/refs{/sha}","trees_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/statuses/{sha}","languages_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/languages","stargazers_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/stargazers","contributors_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/contributors","subscribers_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/subscribers","subscription_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/subscription","commits_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/commits{/sha}","git_commits_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/commits{/sha}","comments_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/comments{/number}","issue_comment_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/comments{/number}","contents_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/contents/{+path}","compare_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/merges","archive_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/downloads","issues_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues{/number}","pulls_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls{/number}","milestones_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/milestones{/number}","notifications_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/labels{/name}","releases_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/releases{/id}","deployments_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/deployments","created_at":"2018-12-02T21:12:57Z","updated_at":"2019-10-14T01:40:43Z","pushed_at":"2019-11-04T01:20:18Z","git_url":"git://github.com/mighty-speed-krush/Mighty-Speed-Krush.git","ssh_url":"git@github.com:mighty-speed-krush/Mighty-Speed-Krush.git","clone_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush.git","svn_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush","homepage":null,"size":8564,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":4,"watchers":2,"default_branch":"dev"}},"base":{"label":"mighty-speed-krush:sequelize","ref":"sequelize","sha":"3894d33279ce3edd198b6cd2b85d93f5ebad6e95","user":{"login":"mighty-speed-krush","id":47199449,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MTk5NDQ5","avatar_url":"https://avatars2.githubusercontent.com/u/47199449?v=4","gravatar_id":"","url":"https://api.github.com/users/mighty-speed-krush","html_url":"https://github.com/mighty-speed-krush","followers_url":"https://api.github.com/users/mighty-speed-krush/followers","following_url":"https://api.github.com/users/mighty-speed-krush/following{/other_user}","gists_url":"https://api.github.com/users/mighty-speed-krush/gists{/gist_id}","starred_url":"https://api.github.com/users/mighty-speed-krush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mighty-speed-krush/subscriptions","organizations_url":"https://api.github.com/users/mighty-speed-krush/orgs","repos_url":"https://api.github.com/users/mighty-speed-krush/repos","events_url":"https://api.github.com/users/mighty-speed-krush/events{/privacy}","received_events_url":"https://api.github.com/users/mighty-speed-krush/received_events","type":"Organization","site_admin":false},"repo":{"id":160095567,"node_id":"MDEwOlJlcG9zaXRvcnkxNjAwOTU1Njc=","name":"Mighty-Speed-Krush","full_name":"mighty-speed-krush/Mighty-Speed-Krush","private":false,"owner":{"login":"mighty-speed-krush","id":47199449,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MTk5NDQ5","avatar_url":"https://avatars2.githubusercontent.com/u/47199449?v=4","gravatar_id":"","url":"https://api.github.com/users/mighty-speed-krush","html_url":"https://github.com/mighty-speed-krush","followers_url":"https://api.github.com/users/mighty-speed-krush/followers","following_url":"https://api.github.com/users/mighty-speed-krush/following{/other_user}","gists_url":"https://api.github.com/users/mighty-speed-krush/gists{/gist_id}","starred_url":"https://api.github.com/users/mighty-speed-krush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mighty-speed-krush/subscriptions","organizations_url":"https://api.github.com/users/mighty-speed-krush/orgs","repos_url":"https://api.github.com/users/mighty-speed-krush/repos","events_url":"https://api.github.com/users/mighty-speed-krush/events{/privacy}","received_events_url":"https://api.github.com/users/mighty-speed-krush/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush","description":null,"fork":false,"url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush","forks_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/forks","keys_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/teams","hooks_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/hooks","issue_events_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/events{/number}","events_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/events","assignees_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/assignees{/user}","branches_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/branches{/branch}","tags_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/tags","blobs_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/refs{/sha}","trees_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/statuses/{sha}","languages_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/languages","stargazers_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/stargazers","contributors_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/contributors","subscribers_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/subscribers","subscription_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/subscription","commits_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/commits{/sha}","git_commits_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/git/commits{/sha}","comments_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/comments{/number}","issue_comment_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/comments{/number}","contents_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/contents/{+path}","compare_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/merges","archive_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/downloads","issues_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues{/number}","pulls_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls{/number}","milestones_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/milestones{/number}","notifications_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/labels{/name}","releases_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/releases{/id}","deployments_url":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/deployments","created_at":"2018-12-02T21:12:57Z","updated_at":"2019-10-14T01:40:43Z","pushed_at":"2019-11-04T01:20:18Z","git_url":"git://github.com/mighty-speed-krush/Mighty-Speed-Krush.git","ssh_url":"git@github.com:mighty-speed-krush/Mighty-Speed-Krush.git","clone_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush.git","svn_url":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush","homepage":null,"size":8564,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":4,"watchers":2,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151"},"html":{"href":"https://github.com/mighty-speed-krush/Mighty-Speed-Krush/pull/151"},"issue":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/151"},"comments":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/mighty-speed-krush/Mighty-Speed-Krush/statuses/23db38bad8d0e6e60c87b0dcbb5319bed2ab7217"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"mienaikoe"}}