{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/comments/65317408","id":65317408,"diff_hunk":"@@ -9,9 +9,32 @@\n  * @returns {boolean}\n  */\n function wantsKeys (request) {\n-  return request.query.keys === 'true'\n+  return request.query.keys === 'true' || request.query.keys === true\n+}\n+\n+/**\n+ * Returns whether or not to perform a signin verification email.\n+ * Currently, the uid is converted to a number between 0-100 which corresponds to the\n+ * sign-in confirmation sample rate.\n+ *\n+ * @param uid\n+ * @returns {boolean}\n+ */\n+function shouldEnableSigninConfirmation(uid, config) {\n+  // Sign-in confirmation is determined by whether the feature is enabled and\n+  // if the user's first two uid digits fall within the config sample rate.\n+  if (config.signinConfirmation && config.signinConfirmation.enabled) {\n+\n+    // Returns the first 2 integers of uid\n+    var uidNum = parseInt(uid.substr(0, 4), 16) % 100","path":"lib/routes/utils/request_helper.js","position":22,"original_position":22,"commit_id":"5bf5255b84d1c677b1a557b7dd19c8729ad5148f","original_commit_id":"5bf5255b84d1c677b1a557b7dd19c8729ad5148f","user":{"login":"philbooth","id":64367,"avatar_url":"https://avatars.githubusercontent.com/u/64367?v=3","gravatar_id":"","url":"https://api.github.com/users/philbooth","html_url":"https://github.com/philbooth","followers_url":"https://api.github.com/users/philbooth/followers","following_url":"https://api.github.com/users/philbooth/following{/other_user}","gists_url":"https://api.github.com/users/philbooth/gists{/gist_id}","starred_url":"https://api.github.com/users/philbooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbooth/subscriptions","organizations_url":"https://api.github.com/users/philbooth/orgs","repos_url":"https://api.github.com/users/philbooth/repos","events_url":"https://api.github.com/users/philbooth/events{/privacy}","received_events_url":"https://api.github.com/users/philbooth/received_events","type":"User","site_admin":false},"body":"Just read that back to myself and it sounds like rubbish now I think about it. Ignore me, sorry. 😊","created_at":"2016-06-01T08:02:24Z","updated_at":"2016-06-01T08:02:24Z","html_url":"https://github.com/mozilla/fxa-auth-server/pull/1275#discussion_r65317408","pull_request_url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275","_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/comments/65317408"},"html":{"href":"https://github.com/mozilla/fxa-auth-server/pull/1275#discussion_r65317408"},"pull_request":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275","id":71286907,"html_url":"https://github.com/mozilla/fxa-auth-server/pull/1275","diff_url":"https://github.com/mozilla/fxa-auth-server/pull/1275.diff","patch_url":"https://github.com/mozilla/fxa-auth-server/pull/1275.patch","issue_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/1275","number":1275,"state":"open","locked":false,"title":" feat(signin): WIP Signin confirmation feature only","user":{"login":"vbudhram","id":1295288,"avatar_url":"https://avatars.githubusercontent.com/u/1295288?v=3","gravatar_id":"","url":"https://api.github.com/users/vbudhram","html_url":"https://github.com/vbudhram","followers_url":"https://api.github.com/users/vbudhram/followers","following_url":"https://api.github.com/users/vbudhram/following{/other_user}","gists_url":"https://api.github.com/users/vbudhram/gists{/gist_id}","starred_url":"https://api.github.com/users/vbudhram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbudhram/subscriptions","organizations_url":"https://api.github.com/users/vbudhram/orgs","repos_url":"https://api.github.com/users/vbudhram/repos","events_url":"https://api.github.com/users/vbudhram/events{/privacy}","received_events_url":"https://api.github.com/users/vbudhram/received_events","type":"User","site_admin":false},"body":"This PR contains only the signin confirmation feature. It is the second PR of https://github.com/mozilla/fxa-auth-server/pull/1232.","created_at":"2016-05-24T20:27:46Z","updated_at":"2016-06-01T08:02:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55b44bfa38f9f66a00406cf6776f1d4c80fd9eaf","assignee":null,"milestone":{"url":"https://api.github.com/repos/mozilla/fxa-auth-server/milestones/61","html_url":"https://github.com/mozilla/fxa-auth-server/milestones/FxA-83:%20signin%20confirmation","labels_url":"https://api.github.com/repos/mozilla/fxa-auth-server/milestones/61/labels","id":1699495,"number":61,"title":"FxA-83: signin confirmation","description":"https://mozilla.aha.io/features/FXA-83","creator":{"login":"rfk","id":34695,"avatar_url":"https://avatars.githubusercontent.com/u/34695?v=3","gravatar_id":"","url":"https://api.github.com/users/rfk","html_url":"https://github.com/rfk","followers_url":"https://api.github.com/users/rfk/followers","following_url":"https://api.github.com/users/rfk/following{/other_user}","gists_url":"https://api.github.com/users/rfk/gists{/gist_id}","starred_url":"https://api.github.com/users/rfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfk/subscriptions","organizations_url":"https://api.github.com/users/rfk/orgs","repos_url":"https://api.github.com/users/rfk/repos","events_url":"https://api.github.com/users/rfk/events{/privacy}","received_events_url":"https://api.github.com/users/rfk/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":4,"state":"open","created_at":"2016-04-12T04:41:47Z","updated_at":"2016-05-27T14:40:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275/commits","review_comments_url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275/comments","review_comment_url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/1275/comments","statuses_url":"https://api.github.com/repos/mozilla/fxa-auth-server/statuses/5bf5255b84d1c677b1a557b7dd19c8729ad5148f","head":{"label":"mozilla:signin-confirmaton-pr2","ref":"signin-confirmaton-pr2","sha":"5bf5255b84d1c677b1a557b7dd19c8729ad5148f","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":10041891,"name":"fxa-auth-server","full_name":"mozilla/fxa-auth-server","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/fxa-auth-server","description":"The Firefox Accounts authentication server.","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-auth-server","forks_url":"https://api.github.com/repos/mozilla/fxa-auth-server/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-auth-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-auth-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-auth-server/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-auth-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-auth-server/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-auth-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-auth-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-auth-server/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-auth-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-auth-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-auth-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-auth-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-auth-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-auth-server/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-auth-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-auth-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/fxa-auth-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-auth-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-auth-server/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-auth-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-auth-server/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-auth-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-auth-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-auth-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-auth-server/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/fxa-auth-server/deployments","created_at":"2013-05-13T21:42:48Z","updated_at":"2016-05-29T12:41:03Z","pushed_at":"2016-06-01T05:42:14Z","git_url":"git://github.com/mozilla/fxa-auth-server.git","ssh_url":"git@github.com:mozilla/fxa-auth-server.git","clone_url":"https://github.com/mozilla/fxa-auth-server.git","svn_url":"https://github.com/mozilla/fxa-auth-server","homepage":"https://wiki.mozilla.org/Identity/Firefox_Accounts","size":5558,"stargazers_count":236,"watchers_count":236,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":45,"forks":61,"open_issues":45,"watchers":236,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"1902d5c99976a339ddaefdc09a952ebb50d398a9","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":10041891,"name":"fxa-auth-server","full_name":"mozilla/fxa-auth-server","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/fxa-auth-server","description":"The Firefox Accounts authentication server.","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-auth-server","forks_url":"https://api.github.com/repos/mozilla/fxa-auth-server/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-auth-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-auth-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-auth-server/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-auth-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-auth-server/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-auth-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-auth-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-auth-server/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-auth-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-auth-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-auth-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-auth-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-auth-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-auth-server/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-auth-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-auth-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-auth-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/fxa-auth-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-auth-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-auth-server/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-auth-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-auth-server/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-auth-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-auth-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-auth-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-auth-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-auth-server/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/fxa-auth-server/deployments","created_at":"2013-05-13T21:42:48Z","updated_at":"2016-05-29T12:41:03Z","pushed_at":"2016-06-01T05:42:14Z","git_url":"git://github.com/mozilla/fxa-auth-server.git","ssh_url":"git@github.com:mozilla/fxa-auth-server.git","clone_url":"https://github.com/mozilla/fxa-auth-server.git","svn_url":"https://github.com/mozilla/fxa-auth-server","homepage":"https://wiki.mozilla.org/Identity/Firefox_Accounts","size":5558,"stargazers_count":236,"watchers_count":236,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":45,"forks":61,"open_issues":45,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275"},"html":{"href":"https://github.com/mozilla/fxa-auth-server/pull/1275"},"issue":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/1275"},"comments":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/issues/1275/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/pulls/1275/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/fxa-auth-server/statuses/5bf5255b84d1c677b1a557b7dd19c8729ad5148f"}}}}
{"actor":{"display_login":"philbooth"}}