{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerLabs/project-health/pulls/comments/166792146","pull_request_review_id":94911975,"id":166792146,"diff_hunk":"@@ -7,7 +7,7 @@ import {GitHub} from '../../utils/github';\n interface LoginDetails {\n   username: string;\n   token: string;\n-  scopes: string[];\n+  scopes: string[]|null;","path":"src/server/models/userModel.ts","position":5,"original_position":5,"commit_id":"252c5369b539e39cd851736ebe4d7ed04532e425","original_commit_id":"252c5369b539e39cd851736ebe4d7ed04532e425","user":{"login":"gauntface","id":139760,"avatar_url":"https://avatars0.githubusercontent.com/u/139760?v=4","gravatar_id":"","url":"https://api.github.com/users/gauntface","html_url":"https://github.com/gauntface","followers_url":"https://api.github.com/users/gauntface/followers","following_url":"https://api.github.com/users/gauntface/following{/other_user}","gists_url":"https://api.github.com/users/gauntface/gists{/gist_id}","starred_url":"https://api.github.com/users/gauntface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauntface/subscriptions","organizations_url":"https://api.github.com/users/gauntface/orgs","repos_url":"https://api.github.com/users/gauntface/repos","events_url":"https://api.github.com/users/gauntface/events{/privacy}","received_events_url":"https://api.github.com/users/gauntface/received_events","type":"User","site_admin":false},"body":"The reason for this is so that we can differentiate between - we know the scopes and there are none granted and when we simply don't know the scopes.\r\n\r\nThis is likely to change when we move to Firestore, so for now I'd like to keep this as is.","created_at":"2018-02-07T23:37:44Z","updated_at":"2018-02-07T23:37:44Z","html_url":"https://github.com/PolymerLabs/project-health/pull/134#discussion_r166792146","pull_request_url":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/PolymerLabs/project-health/pulls/comments/166792146"},"html":{"href":"https://github.com/PolymerLabs/project-health/pull/134#discussion_r166792146"},"pull_request":{"href":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134"}},"in_reply_to_id":166773387},"pull_request":{"url":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134","id":167792011,"html_url":"https://github.com/PolymerLabs/project-health/pull/134","diff_url":"https://github.com/PolymerLabs/project-health/pull/134.diff","patch_url":"https://github.com/PolymerLabs/project-health/pull/134.patch","issue_url":"https://api.github.com/repos/PolymerLabs/project-health/issues/134","number":134,"state":"open","locked":false,"title":"Fixing the uncached user issue","user":{"login":"gauntface","id":139760,"avatar_url":"https://avatars0.githubusercontent.com/u/139760?v=4","gravatar_id":"","url":"https://api.github.com/users/gauntface","html_url":"https://github.com/gauntface","followers_url":"https://api.github.com/users/gauntface/followers","following_url":"https://api.github.com/users/gauntface/following{/other_user}","gists_url":"https://api.github.com/users/gauntface/gists{/gist_id}","starred_url":"https://api.github.com/users/gauntface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauntface/subscriptions","organizations_url":"https://api.github.com/users/gauntface/orgs","repos_url":"https://api.github.com/users/gauntface/repos","events_url":"https://api.github.com/users/gauntface/events{/privacy}","received_events_url":"https://api.github.com/users/gauntface/received_events","type":"User","site_admin":false},"body":"When the user has a token but the server doesn't have the details cached, they have to re-login, this PR changes that so the existing token is used - although we do lose the scope details, which only affects the settings and could be addressed in a different way (i.e. is scopes are null, we should retrieve them from GitHub).","created_at":"2018-02-07T19:51:48Z","updated_at":"2018-02-07T23:37:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83594d26a14de97eb80b41998a0bd9551c0f5bb6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"aomarks","id":48894,"avatar_url":"https://avatars0.githubusercontent.com/u/48894?v=4","gravatar_id":"","url":"https://api.github.com/users/aomarks","html_url":"https://github.com/aomarks","followers_url":"https://api.github.com/users/aomarks/followers","following_url":"https://api.github.com/users/aomarks/following{/other_user}","gists_url":"https://api.github.com/users/aomarks/gists{/gist_id}","starred_url":"https://api.github.com/users/aomarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aomarks/subscriptions","organizations_url":"https://api.github.com/users/aomarks/orgs","repos_url":"https://api.github.com/users/aomarks/repos","events_url":"https://api.github.com/users/aomarks/events{/privacy}","received_events_url":"https://api.github.com/users/aomarks/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134/commits","review_comments_url":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134/comments","review_comment_url":"https://api.github.com/repos/PolymerLabs/project-health/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerLabs/project-health/issues/134/comments","statuses_url":"https://api.github.com/repos/PolymerLabs/project-health/statuses/252c5369b539e39cd851736ebe4d7ed04532e425","head":{"label":"PolymerLabs:user-caching","ref":"user-caching","sha":"252c5369b539e39cd851736ebe4d7ed04532e425","user":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars2.githubusercontent.com/u/5912903?v=4","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":108609951,"name":"project-health","full_name":"PolymerLabs/project-health","owner":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars2.githubusercontent.com/u/5912903?v=4","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerLabs/project-health","description":null,"fork":false,"url":"https://api.github.com/repos/PolymerLabs/project-health","forks_url":"https://api.github.com/repos/PolymerLabs/project-health/forks","keys_url":"https://api.github.com/repos/PolymerLabs/project-health/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerLabs/project-health/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerLabs/project-health/teams","hooks_url":"https://api.github.com/repos/PolymerLabs/project-health/hooks","issue_events_url":"https://api.github.com/repos/PolymerLabs/project-health/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerLabs/project-health/events","assignees_url":"https://api.github.com/repos/PolymerLabs/project-health/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerLabs/project-health/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerLabs/project-health/tags","blobs_url":"https://api.github.com/repos/PolymerLabs/project-health/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerLabs/project-health/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerLabs/project-health/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerLabs/project-health/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerLabs/project-health/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerLabs/project-health/languages","stargazers_url":"https://api.github.com/repos/PolymerLabs/project-health/stargazers","contributors_url":"https://api.github.com/repos/PolymerLabs/project-health/contributors","subscribers_url":"https://api.github.com/repos/PolymerLabs/project-health/subscribers","subscription_url":"https://api.github.com/repos/PolymerLabs/project-health/subscription","commits_url":"https://api.github.com/repos/PolymerLabs/project-health/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerLabs/project-health/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerLabs/project-health/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerLabs/project-health/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerLabs/project-health/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerLabs/project-health/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerLabs/project-health/merges","archive_url":"https://api.github.com/repos/PolymerLabs/project-health/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerLabs/project-health/downloads","issues_url":"https://api.github.com/repos/PolymerLabs/project-health/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerLabs/project-health/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerLabs/project-health/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerLabs/project-health/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerLabs/project-health/labels{/name}","releases_url":"https://api.github.com/repos/PolymerLabs/project-health/releases{/id}","deployments_url":"https://api.github.com/repos/PolymerLabs/project-health/deployments","created_at":"2017-10-28T01:16:52Z","updated_at":"2018-01-14T16:48:23Z","pushed_at":"2018-02-07T23:35:45Z","git_url":"git://github.com/PolymerLabs/project-health.git","ssh_url":"git@github.com:PolymerLabs/project-health.git","clone_url":"https://github.com/PolymerLabs/project-health.git","svn_url":"https://github.com/PolymerLabs/project-health","homepage":null,"size":1336,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":27,"watchers":2,"default_branch":"master"}},"base":{"label":"PolymerLabs:master","ref":"master","sha":"38a0d1340f9f194ce05ac92748fae4fa00dd50b8","user":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars2.githubusercontent.com/u/5912903?v=4","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":108609951,"name":"project-health","full_name":"PolymerLabs/project-health","owner":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars2.githubusercontent.com/u/5912903?v=4","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerLabs/project-health","description":null,"fork":false,"url":"https://api.github.com/repos/PolymerLabs/project-health","forks_url":"https://api.github.com/repos/PolymerLabs/project-health/forks","keys_url":"https://api.github.com/repos/PolymerLabs/project-health/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerLabs/project-health/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerLabs/project-health/teams","hooks_url":"https://api.github.com/repos/PolymerLabs/project-health/hooks","issue_events_url":"https://api.github.com/repos/PolymerLabs/project-health/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerLabs/project-health/events","assignees_url":"https://api.github.com/repos/PolymerLabs/project-health/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerLabs/project-health/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerLabs/project-health/tags","blobs_url":"https://api.github.com/repos/PolymerLabs/project-health/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerLabs/project-health/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerLabs/project-health/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerLabs/project-health/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerLabs/project-health/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerLabs/project-health/languages","stargazers_url":"https://api.github.com/repos/PolymerLabs/project-health/stargazers","contributors_url":"https://api.github.com/repos/PolymerLabs/project-health/contributors","subscribers_url":"https://api.github.com/repos/PolymerLabs/project-health/subscribers","subscription_url":"https://api.github.com/repos/PolymerLabs/project-health/subscription","commits_url":"https://api.github.com/repos/PolymerLabs/project-health/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerLabs/project-health/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerLabs/project-health/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerLabs/project-health/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerLabs/project-health/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerLabs/project-health/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerLabs/project-health/merges","archive_url":"https://api.github.com/repos/PolymerLabs/project-health/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerLabs/project-health/downloads","issues_url":"https://api.github.com/repos/PolymerLabs/project-health/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerLabs/project-health/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerLabs/project-health/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerLabs/project-health/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerLabs/project-health/labels{/name}","releases_url":"https://api.github.com/repos/PolymerLabs/project-health/releases{/id}","deployments_url":"https://api.github.com/repos/PolymerLabs/project-health/deployments","created_at":"2017-10-28T01:16:52Z","updated_at":"2018-01-14T16:48:23Z","pushed_at":"2018-02-07T23:35:45Z","git_url":"git://github.com/PolymerLabs/project-health.git","ssh_url":"git@github.com:PolymerLabs/project-health.git","clone_url":"https://github.com/PolymerLabs/project-health.git","svn_url":"https://github.com/PolymerLabs/project-health","homepage":null,"size":1336,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":27,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134"},"html":{"href":"https://github.com/PolymerLabs/project-health/pull/134"},"issue":{"href":"https://api.github.com/repos/PolymerLabs/project-health/issues/134"},"comments":{"href":"https://api.github.com/repos/PolymerLabs/project-health/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerLabs/project-health/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerLabs/project-health/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerLabs/project-health/statuses/252c5369b539e39cd851736ebe4d7ed04532e425"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gauntface"}}