{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/rogue/pulls/comments/90513096","pull_request_review_id":11032347,"id":90513096,"diff_hunk":"@@ -12,8 +13,22 @@ class UsersController extends Controller\n      */\n     protected $northstar;\n \n-    public function __construct(Northstar $northstar)\n+    public function __construct(Registrar $registrar)\n     {\n-        $this->northstar = $northstar;\n+        $this->registrar = $registrar;\n+    }\n+\n+    /**\n+     * Display a listing of the resource.\n+     *\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function index()\n+    {\n+        $ids = User::all()->pluck('northstar_id')->all();","path":"app/Http/Controllers/UsersController.php","position":28,"original_position":28,"commit_id":"39338bccb78923c45b81aaacd51fc998ea006351","original_commit_id":"39338bccb78923c45b81aaacd51fc998ea006351","user":{"login":"angaither","id":645205,"avatar_url":"https://avatars.githubusercontent.com/u/645205?v=3","gravatar_id":"","url":"https://api.github.com/users/angaither","html_url":"https://github.com/angaither","followers_url":"https://api.github.com/users/angaither/followers","following_url":"https://api.github.com/users/angaither/following{/other_user}","gists_url":"https://api.github.com/users/angaither/gists{/gist_id}","starred_url":"https://api.github.com/users/angaither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angaither/subscriptions","organizations_url":"https://api.github.com/users/angaither/orgs","repos_url":"https://api.github.com/users/angaither/repos","events_url":"https://api.github.com/users/angaither/events{/privacy}","received_events_url":"https://api.github.com/users/angaither/received_events","type":"User","site_admin":false},"body":"oh my bad, I thought this was like gladiator, where we had to kill the whole user page","created_at":"2016-12-01T18:59:45Z","updated_at":"2016-12-01T18:59:46Z","html_url":"https://github.com/DoSomething/rogue/pull/78#discussion_r90513096","pull_request_url":"https://api.github.com/repos/DoSomething/rogue/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/comments/90513096"},"html":{"href":"https://github.com/DoSomething/rogue/pull/78#discussion_r90513096"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/rogue/pulls/78","id":95975982,"html_url":"https://github.com/DoSomething/rogue/pull/78","diff_url":"https://github.com/DoSomething/rogue/pull/78.diff","patch_url":"https://github.com/DoSomething/rogue/pull/78.patch","issue_url":"https://api.github.com/repos/DoSomething/rogue/issues/78","number":78,"state":"open","locked":false,"title":"Get user info","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\nCreates the system of grabbing user information in Rogue. \r\n\r\nFirst we try to grab user information that we stored in cache, if they aren't found there we grab them directly from Northstar. \r\n\r\nThis work is based largely on @weerd 's work in Gladiator. The Gladiator system is a little more complicated since we actually store users in Gladiator, but in Rogue we just store references to northstar ids in the reportbacks table. \r\n\r\nSo what this sets up is a `Registrar` service that handles the logic of resolving users in northstar vs cache. We also have a `CacheRepository` class that handles the storing/grabbing cache logic [(based on this)](https://github.com/DoSomething/gladiator/blob/master/app/Repositories/CacheStorage.php) \r\n\r\nThis also sets up a view at `/users` to just list the users in the users table, which will really only be admins but helps to provide an interface for this work. \r\n\r\n#### How should this be reviewed?\r\n\r\n#### Any background context you want to provide?\r\n\r\nI started writing tests for this, but decided I needed to get this merged in more. I will flag that work for the future. \r\n\r\n#### Relevant tickets\r\nFixes #71 \r\n\r\n#### Checklist\r\n- [ ] Documentation added for new features/changed endpoints.\r\n- [ ] Tested on staging.\r\n- [ ] Pinged a PM if this is a larger PR that would benefit from some additional testing love.","created_at":"2016-11-30T21:20:23Z","updated_at":"2016-12-01T18:59:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80d06e5669ee23189dc777084b9bfa6adc8c4cc9","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},"assignees":[{"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},{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},{"login":"katiecrane","id":4240292,"avatar_url":"https://avatars.githubusercontent.com/u/4240292?v=3","gravatar_id":"","url":"https://api.github.com/users/katiecrane","html_url":"https://github.com/katiecrane","followers_url":"https://api.github.com/users/katiecrane/followers","following_url":"https://api.github.com/users/katiecrane/following{/other_user}","gists_url":"https://api.github.com/users/katiecrane/gists{/gist_id}","starred_url":"https://api.github.com/users/katiecrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katiecrane/subscriptions","organizations_url":"https://api.github.com/users/katiecrane/orgs","repos_url":"https://api.github.com/users/katiecrane/repos","events_url":"https://api.github.com/users/katiecrane/events{/privacy}","received_events_url":"https://api.github.com/users/katiecrane/received_events","type":"User","site_admin":false},{"login":"chloealee","id":9019452,"avatar_url":"https://avatars.githubusercontent.com/u/9019452?v=3","gravatar_id":"","url":"https://api.github.com/users/chloealee","html_url":"https://github.com/chloealee","followers_url":"https://api.github.com/users/chloealee/followers","following_url":"https://api.github.com/users/chloealee/following{/other_user}","gists_url":"https://api.github.com/users/chloealee/gists{/gist_id}","starred_url":"https://api.github.com/users/chloealee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chloealee/subscriptions","organizations_url":"https://api.github.com/users/chloealee/orgs","repos_url":"https://api.github.com/users/chloealee/repos","events_url":"https://api.github.com/users/chloealee/events{/privacy}","received_events_url":"https://api.github.com/users/chloealee/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/rogue/pulls/78/commits","review_comments_url":"https://api.github.com/repos/DoSomething/rogue/pulls/78/comments","review_comment_url":"https://api.github.com/repos/DoSomething/rogue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/rogue/issues/78/comments","statuses_url":"https://api.github.com/repos/DoSomething/rogue/statuses/39338bccb78923c45b81aaacd51fc998ea006351","head":{"label":"DoSomething:get-user-info","ref":"get-user-info","sha":"39338bccb78923c45b81aaacd51fc998ea006351","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":64166359,"name":"rogue","full_name":"DoSomething/rogue","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/rogue","description":"Campaign activity service","fork":false,"url":"https://api.github.com/repos/DoSomething/rogue","forks_url":"https://api.github.com/repos/DoSomething/rogue/forks","keys_url":"https://api.github.com/repos/DoSomething/rogue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/rogue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/rogue/teams","hooks_url":"https://api.github.com/repos/DoSomething/rogue/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/rogue/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/rogue/events","assignees_url":"https://api.github.com/repos/DoSomething/rogue/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/rogue/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/rogue/tags","blobs_url":"https://api.github.com/repos/DoSomething/rogue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/rogue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/rogue/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/rogue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/rogue/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/rogue/languages","stargazers_url":"https://api.github.com/repos/DoSomething/rogue/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/rogue/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/rogue/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/rogue/subscription","commits_url":"https://api.github.com/repos/DoSomething/rogue/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/rogue/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/rogue/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/rogue/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/rogue/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/rogue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/rogue/merges","archive_url":"https://api.github.com/repos/DoSomething/rogue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/rogue/downloads","issues_url":"https://api.github.com/repos/DoSomething/rogue/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/rogue/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/rogue/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/rogue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/rogue/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/rogue/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/rogue/deployments","created_at":"2016-07-25T20:38:30Z","updated_at":"2016-10-24T15:07:17Z","pushed_at":"2016-11-30T21:28:47Z","git_url":"git://github.com/DoSomething/rogue.git","ssh_url":"git@github.com:DoSomething/rogue.git","clone_url":"https://github.com/DoSomething/rogue.git","svn_url":"https://github.com/DoSomething/rogue","homepage":"","size":1173,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"DoSomething:master","ref":"master","sha":"618982350400b05330b1b5e423fd9e25e3ebb22a","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":64166359,"name":"rogue","full_name":"DoSomething/rogue","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/rogue","description":"Campaign activity service","fork":false,"url":"https://api.github.com/repos/DoSomething/rogue","forks_url":"https://api.github.com/repos/DoSomething/rogue/forks","keys_url":"https://api.github.com/repos/DoSomething/rogue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/rogue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/rogue/teams","hooks_url":"https://api.github.com/repos/DoSomething/rogue/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/rogue/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/rogue/events","assignees_url":"https://api.github.com/repos/DoSomething/rogue/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/rogue/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/rogue/tags","blobs_url":"https://api.github.com/repos/DoSomething/rogue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/rogue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/rogue/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/rogue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/rogue/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/rogue/languages","stargazers_url":"https://api.github.com/repos/DoSomething/rogue/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/rogue/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/rogue/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/rogue/subscription","commits_url":"https://api.github.com/repos/DoSomething/rogue/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/rogue/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/rogue/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/rogue/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/rogue/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/rogue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/rogue/merges","archive_url":"https://api.github.com/repos/DoSomething/rogue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/rogue/downloads","issues_url":"https://api.github.com/repos/DoSomething/rogue/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/rogue/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/rogue/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/rogue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/rogue/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/rogue/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/rogue/deployments","created_at":"2016-07-25T20:38:30Z","updated_at":"2016-10-24T15:07:17Z","pushed_at":"2016-11-30T21:28:47Z","git_url":"git://github.com/DoSomething/rogue.git","ssh_url":"git@github.com:DoSomething/rogue.git","clone_url":"https://github.com/DoSomething/rogue.git","svn_url":"https://github.com/DoSomething/rogue","homepage":"","size":1173,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/78"},"html":{"href":"https://github.com/DoSomething/rogue/pull/78"},"issue":{"href":"https://api.github.com/repos/DoSomething/rogue/issues/78"},"comments":{"href":"https://api.github.com/repos/DoSomething/rogue/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/rogue/statuses/39338bccb78923c45b81aaacd51fc998ea006351"}}}}
{"actor":{"display_login":"angaither"}}