payload: {"action":"created","comment":{"url":"https://api.github.com/repos/edx/frontend-platform/pulls/comments/345830821","pull_request_review_id":316338294,"id":345830821,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NTgzMDgyMQ==","diff_hunk":"@@ -0,0 +1,23 @@\n+import { getAuthenticatedApiClient, getAuthenticatedUser, ensureAuthenticatedUser } from '../../auth';\n+import { getConfig } from '../../config';\n+\n+export default async function auth(requireAuthenticatedUser, hydrateAuthenticatedUser) {\n+  // Get a valid access token for authenticated API access.\n+  let authenticatedUser = null;\n+\n+  if (requireAuthenticatedUser) {\n+    authenticatedUser = await ensureAuthenticatedUser();\n+  } else {\n+    authenticatedUser = await getAuthenticatedUser();\n+  }\n+\n+  if (authenticatedUser !== null && hydrateAuthenticatedUser) {\n+    const { username } = authenticatedUser;\n+    getAuthenticatedApiClient()","path":"src/base/handlers/auth.js","position":16,"original_position":16,"commit_id":"958717359bce5a70231acc8e0f928dc075e59e7c","original_commit_id":"12a40587412d467a9eb8d3f1f13c8fdfeb473be0","user":{"login":"davidjoy","id":410630,"node_id":"MDQ6VXNlcjQxMDYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/410630?v=4","gravatar_id":"","url":"https://api.github.com/users/davidjoy","html_url":"https://github.com/davidjoy","followers_url":"https://api.github.com/users/davidjoy/followers","following_url":"https://api.github.com/users/davidjoy/following{/other_user}","gists_url":"https://api.github.com/users/davidjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjoy/subscriptions","organizations_url":"https://api.github.com/users/davidjoy/orgs","repos_url":"https://api.github.com/users/davidjoy/repos","events_url":"https://api.github.com/users/davidjoy/events{/privacy}","received_events_url":"https://api.github.com/users/davidjoy/received_events","type":"User","site_admin":false},"body":"Good call.","created_at":"2019-11-13T15:38:13Z","updated_at":"2019-11-13T15:38:13Z","html_url":"https://github.com/edx/frontend-platform/pull/4#discussion_r345830821","pull_request_url":"https://api.github.com/repos/edx/frontend-platform/pulls/4","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/edx/frontend-platform/pulls/comments/345830821"},"html":{"href":"https://github.com/edx/frontend-platform/pull/4#discussion_r345830821"},"pull_request":{"href":"https://api.github.com/repos/edx/frontend-platform/pulls/4"}},"in_reply_to_id":345779387},"pull_request":{"url":"https://api.github.com/repos/edx/frontend-platform/pulls/4","id":340209067,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQwMjA5MDY3","html_url":"https://github.com/edx/frontend-platform/pull/4","diff_url":"https://github.com/edx/frontend-platform/pull/4.diff","patch_url":"https://github.com/edx/frontend-platform/pull/4.patch","issue_url":"https://api.github.com/repos/edx/frontend-platform/issues/4","number":4,"state":"open","locked":false,"title":"refactor: initial stab at a new initialize function.","user":{"login":"davidjoy","id":410630,"node_id":"MDQ6VXNlcjQxMDYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/410630?v=4","gravatar_id":"","url":"https://api.github.com/users/davidjoy","html_url":"https://github.com/davidjoy","followers_url":"https://api.github.com/users/davidjoy/followers","following_url":"https://api.github.com/users/davidjoy/following{/other_user}","gists_url":"https://api.github.com/users/davidjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjoy/subscriptions","organizations_url":"https://api.github.com/users/davidjoy/orgs","repos_url":"https://api.github.com/users/davidjoy/repos","events_url":"https://api.github.com/users/davidjoy/events{/privacy}","received_events_url":"https://api.github.com/users/davidjoy/received_events","type":"User","site_admin":false},"body":"Now has explicit steps for configuring each service and then accepting (potentially) asynchronous handlers after configuration.  Only auth actually has a default handler.","created_at":"2019-11-13T02:37:40Z","updated_at":"2019-11-13T15:38:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bbf9403a4883f5eae5311adf575d6a99e31253c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/frontend-platform/pulls/4/commits","review_comments_url":"https://api.github.com/repos/edx/frontend-platform/pulls/4/comments","review_comment_url":"https://api.github.com/repos/edx/frontend-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/frontend-platform/issues/4/comments","statuses_url":"https://api.github.com/repos/edx/frontend-platform/statuses/958717359bce5a70231acc8e0f928dc075e59e7c","head":{"label":"edx:djoy/refactor_initialize","ref":"djoy/refactor_initialize","sha":"958717359bce5a70231acc8e0f928dc075e59e7c","user":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":220089599,"node_id":"MDEwOlJlcG9zaXRvcnkyMjAwODk1OTk=","name":"frontend-platform","full_name":"edx/frontend-platform","private":false,"owner":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/edx/frontend-platform","description":null,"fork":false,"url":"https://api.github.com/repos/edx/frontend-platform","forks_url":"https://api.github.com/repos/edx/frontend-platform/forks","keys_url":"https://api.github.com/repos/edx/frontend-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/frontend-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/frontend-platform/teams","hooks_url":"https://api.github.com/repos/edx/frontend-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/frontend-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/frontend-platform/events","assignees_url":"https://api.github.com/repos/edx/frontend-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/frontend-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/frontend-platform/tags","blobs_url":"https://api.github.com/repos/edx/frontend-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/frontend-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/frontend-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/frontend-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/frontend-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/frontend-platform/languages","stargazers_url":"https://api.github.com/repos/edx/frontend-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/frontend-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/frontend-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/frontend-platform/subscription","commits_url":"https://api.github.com/repos/edx/frontend-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/frontend-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/frontend-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/frontend-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/frontend-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/frontend-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/frontend-platform/merges","archive_url":"https://api.github.com/repos/edx/frontend-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/frontend-platform/downloads","issues_url":"https://api.github.com/repos/edx/frontend-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/frontend-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/frontend-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/frontend-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/frontend-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/frontend-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/frontend-platform/deployments","created_at":"2019-11-06T21:04:09Z","updated_at":"2019-11-13T02:35:21Z","pushed_at":"2019-11-13T15:37:52Z","git_url":"git://github.com/edx/frontend-platform.git","ssh_url":"git@github.com:edx/frontend-platform.git","clone_url":"https://github.com/edx/frontend-platform.git","svn_url":"https://github.com/edx/frontend-platform","homepage":null,"size":2465,"stargazers_count":0,"watchers_count":0,"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":2,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"b392f57fcf295e43b87aebd98ddf7aa37d84968f","user":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":220089599,"node_id":"MDEwOlJlcG9zaXRvcnkyMjAwODk1OTk=","name":"frontend-platform","full_name":"edx/frontend-platform","private":false,"owner":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/edx/frontend-platform","description":null,"fork":false,"url":"https://api.github.com/repos/edx/frontend-platform","forks_url":"https://api.github.com/repos/edx/frontend-platform/forks","keys_url":"https://api.github.com/repos/edx/frontend-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/frontend-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/frontend-platform/teams","hooks_url":"https://api.github.com/repos/edx/frontend-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/frontend-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/frontend-platform/events","assignees_url":"https://api.github.com/repos/edx/frontend-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/frontend-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/frontend-platform/tags","blobs_url":"https://api.github.com/repos/edx/frontend-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/frontend-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/frontend-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/frontend-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/frontend-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/frontend-platform/languages","stargazers_url":"https://api.github.com/repos/edx/frontend-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/frontend-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/frontend-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/frontend-platform/subscription","commits_url":"https://api.github.com/repos/edx/frontend-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/frontend-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/frontend-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/frontend-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/frontend-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/frontend-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/frontend-platform/merges","archive_url":"https://api.github.com/repos/edx/frontend-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/frontend-platform/downloads","issues_url":"https://api.github.com/repos/edx/frontend-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/frontend-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/frontend-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/frontend-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/frontend-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/frontend-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/frontend-platform/deployments","created_at":"2019-11-06T21:04:09Z","updated_at":"2019-11-13T02:35:21Z","pushed_at":"2019-11-13T15:37:52Z","git_url":"git://github.com/edx/frontend-platform.git","ssh_url":"git@github.com:edx/frontend-platform.git","clone_url":"https://github.com/edx/frontend-platform.git","svn_url":"https://github.com/edx/frontend-platform","homepage":null,"size":2465,"stargazers_count":0,"watchers_count":0,"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":2,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/frontend-platform/pulls/4"},"html":{"href":"https://github.com/edx/frontend-platform/pull/4"},"issue":{"href":"https://api.github.com/repos/edx/frontend-platform/issues/4"},"comments":{"href":"https://api.github.com/repos/edx/frontend-platform/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/frontend-platform/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/frontend-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/frontend-platform/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/edx/frontend-platform/statuses/958717359bce5a70231acc8e0f928dc075e59e7c"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"davidjoy"}}