{"action":"created","comment":{"url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/comments/196061095","pull_request_review_id":129542134,"id":196061095,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjA2MTA5NQ==","diff_hunk":"@@ -95,10 +97,29 @@ def health():\n @authenticated\n def whoami(user):\n     \"\"\"Return information about the authenticated user.\"\"\"\n-    return Response(\n-        json.dumps(user, indent=1, sort_keys=True),\n-        mimetype='application/json',\n+    headers = {auth.auth_header_name: 'token {0}'.format(auth.api_token)}\n+    info = json.loads(\n+        requests.request(\n+            'GET',\n+            '{prefix}/users/{user[name]}'.format(\n+                prefix=auth.api_url, user=user\n+            ),\n+            headers=headers\n+        ).text\n     )\n+    return jsonify(info)\n+\n+\n+@authenticated","path":"src/notebooks_service.py","position":29,"original_position":29,"commit_id":"cc6c0180f43d8aa2e019498060adda89f9f253a7","original_commit_id":"cc6c0180f43d8aa2e019498060adda89f9f253a7","user":{"login":"ciyer","id":1196411,"node_id":"MDQ6VXNlcjExOTY0MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1196411?v=4","gravatar_id":"","url":"https://api.github.com/users/ciyer","html_url":"https://github.com/ciyer","followers_url":"https://api.github.com/users/ciyer/followers","following_url":"https://api.github.com/users/ciyer/following{/other_user}","gists_url":"https://api.github.com/users/ciyer/gists{/gist_id}","starred_url":"https://api.github.com/users/ciyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciyer/subscriptions","organizations_url":"https://api.github.com/users/ciyer/orgs","repos_url":"https://api.github.com/users/ciyer/repos","events_url":"https://api.github.com/users/ciyer/events{/privacy}","received_events_url":"https://api.github.com/users/ciyer/received_events","type":"User","site_admin":false},"body":"Because the static files access API endpoints that require authentication. The UI code is simpler if it can assume that the user is already authenticated.","created_at":"2018-06-18T12:38:17Z","updated_at":"2018-06-18T12:38:17Z","html_url":"https://github.com/SwissDataScienceCenter/renku-notebooks/pull/15#discussion_r196061095","pull_request_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/comments/196061095"},"html":{"href":"https://github.com/SwissDataScienceCenter/renku-notebooks/pull/15#discussion_r196061095"},"pull_request":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15"}},"in_reply_to_id":196058185},"pull_request":{"url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15","id":195162998,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MTYyOTk4","html_url":"https://github.com/SwissDataScienceCenter/renku-notebooks/pull/15","diff_url":"https://github.com/SwissDataScienceCenter/renku-notebooks/pull/15.diff","patch_url":"https://github.com/SwissDataScienceCenter/renku-notebooks/pull/15.patch","issue_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues/15","number":15,"state":"open","locked":false,"title":"Create UI for connecting to and stopping jupyter notebook servers.","user":{"login":"ciyer","id":1196411,"node_id":"MDQ6VXNlcjExOTY0MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1196411?v=4","gravatar_id":"","url":"https://api.github.com/users/ciyer","html_url":"https://github.com/ciyer","followers_url":"https://api.github.com/users/ciyer/followers","following_url":"https://api.github.com/users/ciyer/following{/other_user}","gists_url":"https://api.github.com/users/ciyer/gists{/gist_id}","starred_url":"https://api.github.com/users/ciyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciyer/subscriptions","organizations_url":"https://api.github.com/users/ciyer/orgs","repos_url":"https://api.github.com/users/ciyer/repos","events_url":"https://api.github.com/users/ciyer/events{/privacy}","received_events_url":"https://api.github.com/users/ciyer/received_events","type":"User","site_admin":false},"body":"Implements a basic UI for viewing, connecting to, and stopping running servers.\r\n","created_at":"2018-06-15T12:43:27Z","updated_at":"2018-06-18T12:38:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ba64919fdb5a3b732d8c4243e0d0a07b0509bd6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15/commits","review_comments_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15/comments","review_comment_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues/15/comments","statuses_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/statuses/cc6c0180f43d8aa2e019498060adda89f9f253a7","head":{"label":"ciyer:151-notebook-ui","ref":"151-notebook-ui","sha":"cc6c0180f43d8aa2e019498060adda89f9f253a7","user":{"login":"ciyer","id":1196411,"node_id":"MDQ6VXNlcjExOTY0MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1196411?v=4","gravatar_id":"","url":"https://api.github.com/users/ciyer","html_url":"https://github.com/ciyer","followers_url":"https://api.github.com/users/ciyer/followers","following_url":"https://api.github.com/users/ciyer/following{/other_user}","gists_url":"https://api.github.com/users/ciyer/gists{/gist_id}","starred_url":"https://api.github.com/users/ciyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciyer/subscriptions","organizations_url":"https://api.github.com/users/ciyer/orgs","repos_url":"https://api.github.com/users/ciyer/repos","events_url":"https://api.github.com/users/ciyer/events{/privacy}","received_events_url":"https://api.github.com/users/ciyer/received_events","type":"User","site_admin":false},"repo":{"id":137348804,"node_id":"MDEwOlJlcG9zaXRvcnkxMzczNDg4MDQ=","name":"renku-notebooks","full_name":"ciyer/renku-notebooks","owner":{"login":"ciyer","id":1196411,"node_id":"MDQ6VXNlcjExOTY0MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1196411?v=4","gravatar_id":"","url":"https://api.github.com/users/ciyer","html_url":"https://github.com/ciyer","followers_url":"https://api.github.com/users/ciyer/followers","following_url":"https://api.github.com/users/ciyer/following{/other_user}","gists_url":"https://api.github.com/users/ciyer/gists{/gist_id}","starred_url":"https://api.github.com/users/ciyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciyer/subscriptions","organizations_url":"https://api.github.com/users/ciyer/orgs","repos_url":"https://api.github.com/users/ciyer/repos","events_url":"https://api.github.com/users/ciyer/events{/privacy}","received_events_url":"https://api.github.com/users/ciyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ciyer/renku-notebooks","description":"JupyterHub service for providing notebooks to the Renku platform.","fork":true,"url":"https://api.github.com/repos/ciyer/renku-notebooks","forks_url":"https://api.github.com/repos/ciyer/renku-notebooks/forks","keys_url":"https://api.github.com/repos/ciyer/renku-notebooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ciyer/renku-notebooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ciyer/renku-notebooks/teams","hooks_url":"https://api.github.com/repos/ciyer/renku-notebooks/hooks","issue_events_url":"https://api.github.com/repos/ciyer/renku-notebooks/issues/events{/number}","events_url":"https://api.github.com/repos/ciyer/renku-notebooks/events","assignees_url":"https://api.github.com/repos/ciyer/renku-notebooks/assignees{/user}","branches_url":"https://api.github.com/repos/ciyer/renku-notebooks/branches{/branch}","tags_url":"https://api.github.com/repos/ciyer/renku-notebooks/tags","blobs_url":"https://api.github.com/repos/ciyer/renku-notebooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ciyer/renku-notebooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ciyer/renku-notebooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/ciyer/renku-notebooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ciyer/renku-notebooks/statuses/{sha}","languages_url":"https://api.github.com/repos/ciyer/renku-notebooks/languages","stargazers_url":"https://api.github.com/repos/ciyer/renku-notebooks/stargazers","contributors_url":"https://api.github.com/repos/ciyer/renku-notebooks/contributors","subscribers_url":"https://api.github.com/repos/ciyer/renku-notebooks/subscribers","subscription_url":"https://api.github.com/repos/ciyer/renku-notebooks/subscription","commits_url":"https://api.github.com/repos/ciyer/renku-notebooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/ciyer/renku-notebooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/ciyer/renku-notebooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/ciyer/renku-notebooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/ciyer/renku-notebooks/contents/{+path}","compare_url":"https://api.github.com/repos/ciyer/renku-notebooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ciyer/renku-notebooks/merges","archive_url":"https://api.github.com/repos/ciyer/renku-notebooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ciyer/renku-notebooks/downloads","issues_url":"https://api.github.com/repos/ciyer/renku-notebooks/issues{/number}","pulls_url":"https://api.github.com/repos/ciyer/renku-notebooks/pulls{/number}","milestones_url":"https://api.github.com/repos/ciyer/renku-notebooks/milestones{/number}","notifications_url":"https://api.github.com/repos/ciyer/renku-notebooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ciyer/renku-notebooks/labels{/name}","releases_url":"https://api.github.com/repos/ciyer/renku-notebooks/releases{/id}","deployments_url":"https://api.github.com/repos/ciyer/renku-notebooks/deployments","created_at":"2018-06-14T11:24:22Z","updated_at":"2018-06-14T11:24:24Z","pushed_at":"2018-06-18T12:18:13Z","git_url":"git://github.com/ciyer/renku-notebooks.git","ssh_url":"git@github.com:ciyer/renku-notebooks.git","clone_url":"https://github.com/ciyer/renku-notebooks.git","svn_url":"https://github.com/ciyer/renku-notebooks","homepage":null,"size":148,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SwissDataScienceCenter:master","ref":"master","sha":"575b92efb6e1f49b17f23e06934ea271fcff8d8c","user":{"login":"SwissDataScienceCenter","id":25008760,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDA4NzYw","avatar_url":"https://avatars3.githubusercontent.com/u/25008760?v=4","gravatar_id":"","url":"https://api.github.com/users/SwissDataScienceCenter","html_url":"https://github.com/SwissDataScienceCenter","followers_url":"https://api.github.com/users/SwissDataScienceCenter/followers","following_url":"https://api.github.com/users/SwissDataScienceCenter/following{/other_user}","gists_url":"https://api.github.com/users/SwissDataScienceCenter/gists{/gist_id}","starred_url":"https://api.github.com/users/SwissDataScienceCenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwissDataScienceCenter/subscriptions","organizations_url":"https://api.github.com/users/SwissDataScienceCenter/orgs","repos_url":"https://api.github.com/users/SwissDataScienceCenter/repos","events_url":"https://api.github.com/users/SwissDataScienceCenter/events{/privacy}","received_events_url":"https://api.github.com/users/SwissDataScienceCenter/received_events","type":"Organization","site_admin":false},"repo":{"id":135497445,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU0OTc0NDU=","name":"renku-notebooks","full_name":"SwissDataScienceCenter/renku-notebooks","owner":{"login":"SwissDataScienceCenter","id":25008760,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDA4NzYw","avatar_url":"https://avatars3.githubusercontent.com/u/25008760?v=4","gravatar_id":"","url":"https://api.github.com/users/SwissDataScienceCenter","html_url":"https://github.com/SwissDataScienceCenter","followers_url":"https://api.github.com/users/SwissDataScienceCenter/followers","following_url":"https://api.github.com/users/SwissDataScienceCenter/following{/other_user}","gists_url":"https://api.github.com/users/SwissDataScienceCenter/gists{/gist_id}","starred_url":"https://api.github.com/users/SwissDataScienceCenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwissDataScienceCenter/subscriptions","organizations_url":"https://api.github.com/users/SwissDataScienceCenter/orgs","repos_url":"https://api.github.com/users/SwissDataScienceCenter/repos","events_url":"https://api.github.com/users/SwissDataScienceCenter/events{/privacy}","received_events_url":"https://api.github.com/users/SwissDataScienceCenter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SwissDataScienceCenter/renku-notebooks","description":"JupyterHub service for providing notebooks to the Renku platform.","fork":false,"url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks","forks_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/forks","keys_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/teams","hooks_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/hooks","issue_events_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues/events{/number}","events_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/events","assignees_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/assignees{/user}","branches_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/branches{/branch}","tags_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/tags","blobs_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/statuses/{sha}","languages_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/languages","stargazers_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/stargazers","contributors_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/contributors","subscribers_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/subscribers","subscription_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/subscription","commits_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/contents/{+path}","compare_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/merges","archive_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/downloads","issues_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues{/number}","pulls_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls{/number}","milestones_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/milestones{/number}","notifications_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/labels{/name}","releases_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/releases{/id}","deployments_url":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/deployments","created_at":"2018-05-30T21:03:40Z","updated_at":"2018-06-15T11:42:38Z","pushed_at":"2018-06-18T12:18:15Z","git_url":"git://github.com/SwissDataScienceCenter/renku-notebooks.git","ssh_url":"git@github.com:SwissDataScienceCenter/renku-notebooks.git","clone_url":"https://github.com/SwissDataScienceCenter/renku-notebooks.git","svn_url":"https://github.com/SwissDataScienceCenter/renku-notebooks","homepage":null,"size":50,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15"},"html":{"href":"https://github.com/SwissDataScienceCenter/renku-notebooks/pull/15"},"issue":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues/15"},"comments":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/SwissDataScienceCenter/renku-notebooks/statuses/cc6c0180f43d8aa2e019498060adda89f9f253a7"}},"author_association":"NONE"}}
{"actor":{"display_login":"ciyer"}}