{"action":"created","comment":{"url":"https://api.github.com/repos/projecttacoma/bonnie/pulls/comments/193112286","pull_request_review_id":126019384,"id":193112286,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzExMjI4Ng==","diff_hunk":"@@ -0,0 +1,26 @@\n+class DoorkeeperOverride::TokenInfoController < Doorkeeper::ApplicationMetalController\n+  def show\n+    if doorkeeper_token && doorkeeper_token.accessible?\n+      user = User.find(doorkeeper_token.resource_owner_id)\n+      if !user.nil?\n+        token_info = {\n+            user_email: user.email,\n+            user_name: \"#{user.first_name} #{user.last_name}\",\n+            scopes: doorkeeper_token.scopes,\n+            expires_in_seconds: doorkeeper_token.expires_in_seconds,\n+            created_at: doorkeeper_token.created_at.to_i\n+        }\n+        render json: token_info, status: :ok\n+\n+      else # if the user does not exist, then return with unauthorized error response.\n+        error = Doorkeeper::OAuth::ErrorResponse.new(name: :unauthorized)\n+        response.headers.merge!(error.headers)\n+        render json: error.body, status: error.status\n+      end\n+    else\n+      error = Doorkeeper::OAuth::ErrorResponse.new(name: :invalid_request)","path":"app/controllers/doorkeeper_override/token_info_controller.rb","position":22,"original_position":21,"commit_id":"0223727b4567983655673778605c5b4ac1e199e5","original_commit_id":"7e13ec9df1936248247e968c20eedc028002605d","user":{"login":"hossenlopp","id":11613067,"node_id":"MDQ6VXNlcjExNjEzMDY3","avatar_url":"https://avatars1.githubusercontent.com/u/11613067?v=4","gravatar_id":"","url":"https://api.github.com/users/hossenlopp","html_url":"https://github.com/hossenlopp","followers_url":"https://api.github.com/users/hossenlopp/followers","following_url":"https://api.github.com/users/hossenlopp/following{/other_user}","gists_url":"https://api.github.com/users/hossenlopp/gists{/gist_id}","starred_url":"https://api.github.com/users/hossenlopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hossenlopp/subscriptions","organizations_url":"https://api.github.com/users/hossenlopp/orgs","repos_url":"https://api.github.com/users/hossenlopp/repos","events_url":"https://api.github.com/users/hossenlopp/events{/privacy}","received_events_url":"https://api.github.com/users/hossenlopp/received_events","type":"User","site_admin":false},"body":"Oh well.","created_at":"2018-06-05T15:15:13Z","updated_at":"2018-06-05T15:15:13Z","html_url":"https://github.com/projecttacoma/bonnie/pull/1006#discussion_r193112286","pull_request_url":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/projecttacoma/bonnie/pulls/comments/193112286"},"html":{"href":"https://github.com/projecttacoma/bonnie/pull/1006#discussion_r193112286"},"pull_request":{"href":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006"}},"in_reply_to_id":193095473},"pull_request":{"url":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006","id":192087387,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMDg3Mzg3","html_url":"https://github.com/projecttacoma/bonnie/pull/1006","diff_url":"https://github.com/projecttacoma/bonnie/pull/1006.diff","patch_url":"https://github.com/projecttacoma/bonnie/pull/1006.patch","issue_url":"https://api.github.com/repos/projecttacoma/bonnie/issues/1006","number":1006,"state":"open","locked":false,"title":"Bonnie 1469: Add user info API call with username and email","user":{"login":"c-monkey","id":22219041,"node_id":"MDQ6VXNlcjIyMjE5MDQx","avatar_url":"https://avatars1.githubusercontent.com/u/22219041?v=4","gravatar_id":"","url":"https://api.github.com/users/c-monkey","html_url":"https://github.com/c-monkey","followers_url":"https://api.github.com/users/c-monkey/followers","following_url":"https://api.github.com/users/c-monkey/following{/other_user}","gists_url":"https://api.github.com/users/c-monkey/gists{/gist_id}","starred_url":"https://api.github.com/users/c-monkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-monkey/subscriptions","organizations_url":"https://api.github.com/users/c-monkey/orgs","repos_url":"https://api.github.com/users/c-monkey/repos","events_url":"https://api.github.com/users/c-monkey/events{/privacy}","received_events_url":"https://api.github.com/users/c-monkey/received_events","type":"User","site_admin":false},"body":"Answer \"Who am I?\" question for MAT.\r\n\r\nPull requests into Bonnie require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable (\"N/A\") and :white_check_mark:.\r\n\r\nCorresponding changes in the `bonnie-api-client` tool: https://gitlab.mitre.org/bonnie/bonnie-api-client/commit/7e94b34a01d51bdbd0d0637b89129c5c57081de3\r\n\r\n**Submitter:**\r\n- [x] This pull request describes why these changes were made.\r\n- [x] This PR is into the correct branch.\r\n- [x] JIRA ticket for this PR: https://jira.mitre.org/browse/BONNIE-1469\r\n- [x] JIRA ticket links to this PR\r\n- [x] Code diff has been done and been reviewed (it **does not** contain: additional white space, not applicable code changes, debug statements, etc.)\r\n- [x] If UI changes have been made, google WAVE plug-in has been executed to ensure no 508 issues were introduced.\r\n- [x] Tests are included and test edge cases\r\n- [x] Tests have been run locally and pass (remember to update Gemfile when applicable)\r\n- [x] Test fixtures updated and documented as necessary ( see [internal wiki](https://gitlab.mitre.org/bonnie/internal-documentation/wikis/testing#test-fixtures) )\r\n- [x] Code coverage has not gone down and all code touched or added is covered. \r\n     * In rare situations, this may not be possible or applicable to a PR. In those situations:\r\n         1. Note why this could not be done or is not applicable here: \r\n         2. Add TODOs in the code noting that it requires a test\r\n         3. Add a JIRA task to add the test and link it here: \r\n\r\nBranch | Back End Coverage\r\n-- | --\r\nmat-integration-review | 1825 / 2983 LOC (61.18%) covered.\r\nbonnie_1469_user_info_extension  | 1840 / 2998 LOC (61.37%) covered.\r\n\r\nIf JIRA tests were used to supplement or replace automated tests:\r\n- [X] JIRA test links: N/A\r\n- [X] Justification for using JIRA tests: N/A\r\n- [X] JIRA tests have been added to sprint N/A\r\n\r\n\r\n**Reviewer 1:**\r\n\r\nName: @losborne \r\n- [x] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose\r\n- [x] The tests appropriately test the new code, including edge cases\r\n- [x] You have tried to break the code\r\n\r\nIf JIRA tests were used to supplement or replace automated tests:\r\n- [X] JIRA tests have been run and pass N/A\r\n- [X] You agree with the justification for use of JIRA tests or have provided input on why you disagree N/A\r\n\r\n\r\n**Reviewer 2:**\r\n\r\nName: @jbradl11 \r\n- [ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose\r\n- [ ] The tests appropriately test the new code, including edge cases\r\n- [ ] You have tried to break the code\r\n\r\nIf JIRA tests were used to supplement or replace automated tests:\r\n- [X] JIRA tests have been run and pass N/A\r\n- [X] You agree with the justification for use of JIRA tests or have provided input on why you disagree N/A","created_at":"2018-06-01T16:45:23Z","updated_at":"2018-06-05T15:15:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"014e0f2861a93eccf463e1d5f338b8ea4a9523ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006/commits","review_comments_url":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006/comments","review_comment_url":"https://api.github.com/repos/projecttacoma/bonnie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecttacoma/bonnie/issues/1006/comments","statuses_url":"https://api.github.com/repos/projecttacoma/bonnie/statuses/0223727b4567983655673778605c5b4ac1e199e5","head":{"label":"projecttacoma:bonnie_1469_user_info_extension","ref":"bonnie_1469_user_info_extension","sha":"0223727b4567983655673778605c5b4ac1e199e5","user":{"login":"projecttacoma","id":5497023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0OTcwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"repo":{"id":12958279,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk1ODI3OQ==","name":"bonnie","full_name":"projecttacoma/bonnie","owner":{"login":"projecttacoma","id":5497023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0OTcwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecttacoma/bonnie","description":"Clinical Quality Measure Testing Tool","fork":false,"url":"https://api.github.com/repos/projecttacoma/bonnie","forks_url":"https://api.github.com/repos/projecttacoma/bonnie/forks","keys_url":"https://api.github.com/repos/projecttacoma/bonnie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecttacoma/bonnie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecttacoma/bonnie/teams","hooks_url":"https://api.github.com/repos/projecttacoma/bonnie/hooks","issue_events_url":"https://api.github.com/repos/projecttacoma/bonnie/issues/events{/number}","events_url":"https://api.github.com/repos/projecttacoma/bonnie/events","assignees_url":"https://api.github.com/repos/projecttacoma/bonnie/assignees{/user}","branches_url":"https://api.github.com/repos/projecttacoma/bonnie/branches{/branch}","tags_url":"https://api.github.com/repos/projecttacoma/bonnie/tags","blobs_url":"https://api.github.com/repos/projecttacoma/bonnie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecttacoma/bonnie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecttacoma/bonnie/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecttacoma/bonnie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecttacoma/bonnie/statuses/{sha}","languages_url":"https://api.github.com/repos/projecttacoma/bonnie/languages","stargazers_url":"https://api.github.com/repos/projecttacoma/bonnie/stargazers","contributors_url":"https://api.github.com/repos/projecttacoma/bonnie/contributors","subscribers_url":"https://api.github.com/repos/projecttacoma/bonnie/subscribers","subscription_url":"https://api.github.com/repos/projecttacoma/bonnie/subscription","commits_url":"https://api.github.com/repos/projecttacoma/bonnie/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecttacoma/bonnie/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecttacoma/bonnie/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecttacoma/bonnie/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecttacoma/bonnie/contents/{+path}","compare_url":"https://api.github.com/repos/projecttacoma/bonnie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecttacoma/bonnie/merges","archive_url":"https://api.github.com/repos/projecttacoma/bonnie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecttacoma/bonnie/downloads","issues_url":"https://api.github.com/repos/projecttacoma/bonnie/issues{/number}","pulls_url":"https://api.github.com/repos/projecttacoma/bonnie/pulls{/number}","milestones_url":"https://api.github.com/repos/projecttacoma/bonnie/milestones{/number}","notifications_url":"https://api.github.com/repos/projecttacoma/bonnie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecttacoma/bonnie/labels{/name}","releases_url":"https://api.github.com/repos/projecttacoma/bonnie/releases{/id}","deployments_url":"https://api.github.com/repos/projecttacoma/bonnie/deployments","created_at":"2013-09-19T20:11:14Z","updated_at":"2018-05-31T18:10:29Z","pushed_at":"2018-06-05T15:05:33Z","git_url":"git://github.com/projecttacoma/bonnie.git","ssh_url":"git@github.com:projecttacoma/bonnie.git","clone_url":"https://github.com/projecttacoma/bonnie.git","svn_url":"https://github.com/projecttacoma/bonnie","homepage":null,"size":112607,"stargazers_count":21,"watchers_count":21,"language":"CoffeeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":19,"open_issues":11,"watchers":21,"default_branch":"master"}},"base":{"label":"projecttacoma:mat-integration-review","ref":"mat-integration-review","sha":"0405dfd2c0d0814223f59ab37193fb344451d059","user":{"login":"projecttacoma","id":5497023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0OTcwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"repo":{"id":12958279,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk1ODI3OQ==","name":"bonnie","full_name":"projecttacoma/bonnie","owner":{"login":"projecttacoma","id":5497023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0OTcwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecttacoma/bonnie","description":"Clinical Quality Measure Testing Tool","fork":false,"url":"https://api.github.com/repos/projecttacoma/bonnie","forks_url":"https://api.github.com/repos/projecttacoma/bonnie/forks","keys_url":"https://api.github.com/repos/projecttacoma/bonnie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecttacoma/bonnie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecttacoma/bonnie/teams","hooks_url":"https://api.github.com/repos/projecttacoma/bonnie/hooks","issue_events_url":"https://api.github.com/repos/projecttacoma/bonnie/issues/events{/number}","events_url":"https://api.github.com/repos/projecttacoma/bonnie/events","assignees_url":"https://api.github.com/repos/projecttacoma/bonnie/assignees{/user}","branches_url":"https://api.github.com/repos/projecttacoma/bonnie/branches{/branch}","tags_url":"https://api.github.com/repos/projecttacoma/bonnie/tags","blobs_url":"https://api.github.com/repos/projecttacoma/bonnie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecttacoma/bonnie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecttacoma/bonnie/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecttacoma/bonnie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecttacoma/bonnie/statuses/{sha}","languages_url":"https://api.github.com/repos/projecttacoma/bonnie/languages","stargazers_url":"https://api.github.com/repos/projecttacoma/bonnie/stargazers","contributors_url":"https://api.github.com/repos/projecttacoma/bonnie/contributors","subscribers_url":"https://api.github.com/repos/projecttacoma/bonnie/subscribers","subscription_url":"https://api.github.com/repos/projecttacoma/bonnie/subscription","commits_url":"https://api.github.com/repos/projecttacoma/bonnie/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecttacoma/bonnie/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecttacoma/bonnie/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecttacoma/bonnie/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecttacoma/bonnie/contents/{+path}","compare_url":"https://api.github.com/repos/projecttacoma/bonnie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecttacoma/bonnie/merges","archive_url":"https://api.github.com/repos/projecttacoma/bonnie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecttacoma/bonnie/downloads","issues_url":"https://api.github.com/repos/projecttacoma/bonnie/issues{/number}","pulls_url":"https://api.github.com/repos/projecttacoma/bonnie/pulls{/number}","milestones_url":"https://api.github.com/repos/projecttacoma/bonnie/milestones{/number}","notifications_url":"https://api.github.com/repos/projecttacoma/bonnie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecttacoma/bonnie/labels{/name}","releases_url":"https://api.github.com/repos/projecttacoma/bonnie/releases{/id}","deployments_url":"https://api.github.com/repos/projecttacoma/bonnie/deployments","created_at":"2013-09-19T20:11:14Z","updated_at":"2018-05-31T18:10:29Z","pushed_at":"2018-06-05T15:05:33Z","git_url":"git://github.com/projecttacoma/bonnie.git","ssh_url":"git@github.com:projecttacoma/bonnie.git","clone_url":"https://github.com/projecttacoma/bonnie.git","svn_url":"https://github.com/projecttacoma/bonnie","homepage":null,"size":112607,"stargazers_count":21,"watchers_count":21,"language":"CoffeeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":19,"open_issues":11,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006"},"html":{"href":"https://github.com/projecttacoma/bonnie/pull/1006"},"issue":{"href":"https://api.github.com/repos/projecttacoma/bonnie/issues/1006"},"comments":{"href":"https://api.github.com/repos/projecttacoma/bonnie/issues/1006/comments"},"review_comments":{"href":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006/comments"},"review_comment":{"href":"https://api.github.com/repos/projecttacoma/bonnie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecttacoma/bonnie/pulls/1006/commits"},"statuses":{"href":"https://api.github.com/repos/projecttacoma/bonnie/statuses/0223727b4567983655673778605c5b4ac1e199e5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hossenlopp"}}