{"action":"created","comment":{"url":"https://api.github.com/repos/ca-cwds/county-admin/pulls/comments/225630573","pull_request_review_id":165272041,"id":225630573,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTYzMDU3Mw==","diff_hunk":"@@ -45,9 +45,22 @@ class UserService {\n       });\n     }\n \n-    const data = { enabled: details['enabled'], permissions: permissions };\n+    const roles = [];\n+    if (Array.isArray(details.roles)) {\n+      [].push.apply(roles, details['roles']);","path":"app/javascript/_services/users/user.service.js","position":7,"original_position":7,"commit_id":"c16fd8ce6cc4fa8f72be8a0043691cc42385a9a1","original_commit_id":"c16fd8ce6cc4fa8f72be8a0043691cc42385a9a1","user":{"login":"Nasir2712","id":8887704,"node_id":"MDQ6VXNlcjg4ODc3MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8887704?v=4","gravatar_id":"","url":"https://api.github.com/users/Nasir2712","html_url":"https://github.com/Nasir2712","followers_url":"https://api.github.com/users/Nasir2712/followers","following_url":"https://api.github.com/users/Nasir2712/following{/other_user}","gists_url":"https://api.github.com/users/Nasir2712/gists{/gist_id}","starred_url":"https://api.github.com/users/Nasir2712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nasir2712/subscriptions","organizations_url":"https://api.github.com/users/Nasir2712/orgs","repos_url":"https://api.github.com/users/Nasir2712/repos","events_url":"https://api.github.com/users/Nasir2712/events{/privacy}","received_events_url":"https://api.github.com/users/Nasir2712/received_events","type":"User","site_admin":false},"body":"why are we using this logic? why cant we just do-\r\n```const userData = {\r\nroles: details['roles']\r\n}```","created_at":"2018-10-16T17:12:25Z","updated_at":"2018-10-16T17:12:25Z","html_url":"https://github.com/ca-cwds/county-admin/pull/195#discussion_r225630573","pull_request_url":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/county-admin/pulls/comments/225630573"},"html":{"href":"https://github.com/ca-cwds/county-admin/pull/195#discussion_r225630573"},"pull_request":{"href":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195","id":222270206,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMjcwMjA2","html_url":"https://github.com/ca-cwds/county-admin/pull/195","diff_url":"https://github.com/ca-cwds/county-admin/pull/195.diff","patch_url":"https://github.com/ca-cwds/county-admin/pull/195.patch","issue_url":"https://api.github.com/repos/ca-cwds/county-admin/issues/195","number":195,"state":"open","locked":false,"title":"COG-649 Edit Roles ","user":{"login":"RamuKammagani-osi","id":30534124,"node_id":"MDQ6VXNlcjMwNTM0MTI0","avatar_url":"https://avatars0.githubusercontent.com/u/30534124?v=4","gravatar_id":"","url":"https://api.github.com/users/RamuKammagani-osi","html_url":"https://github.com/RamuKammagani-osi","followers_url":"https://api.github.com/users/RamuKammagani-osi/followers","following_url":"https://api.github.com/users/RamuKammagani-osi/following{/other_user}","gists_url":"https://api.github.com/users/RamuKammagani-osi/gists{/gist_id}","starred_url":"https://api.github.com/users/RamuKammagani-osi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RamuKammagani-osi/subscriptions","organizations_url":"https://api.github.com/users/RamuKammagani-osi/orgs","repos_url":"https://api.github.com/users/RamuKammagani-osi/repos","events_url":"https://api.github.com/users/RamuKammagani-osi/events{/privacy}","received_events_url":"https://api.github.com/users/RamuKammagani-osi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-11T20:32:06Z","updated_at":"2018-10-16T17:12:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"456ef4a80e8756b1d52e39a635d78bb5093fcd4e","assignee":{"login":"RamuKammagani-osi","id":30534124,"node_id":"MDQ6VXNlcjMwNTM0MTI0","avatar_url":"https://avatars0.githubusercontent.com/u/30534124?v=4","gravatar_id":"","url":"https://api.github.com/users/RamuKammagani-osi","html_url":"https://github.com/RamuKammagani-osi","followers_url":"https://api.github.com/users/RamuKammagani-osi/followers","following_url":"https://api.github.com/users/RamuKammagani-osi/following{/other_user}","gists_url":"https://api.github.com/users/RamuKammagani-osi/gists{/gist_id}","starred_url":"https://api.github.com/users/RamuKammagani-osi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RamuKammagani-osi/subscriptions","organizations_url":"https://api.github.com/users/RamuKammagani-osi/orgs","repos_url":"https://api.github.com/users/RamuKammagani-osi/repos","events_url":"https://api.github.com/users/RamuKammagani-osi/events{/privacy}","received_events_url":"https://api.github.com/users/RamuKammagani-osi/received_events","type":"User","site_admin":false},"assignees":[{"login":"RamuKammagani-osi","id":30534124,"node_id":"MDQ6VXNlcjMwNTM0MTI0","avatar_url":"https://avatars0.githubusercontent.com/u/30534124?v=4","gravatar_id":"","url":"https://api.github.com/users/RamuKammagani-osi","html_url":"https://github.com/RamuKammagani-osi","followers_url":"https://api.github.com/users/RamuKammagani-osi/followers","following_url":"https://api.github.com/users/RamuKammagani-osi/following{/other_user}","gists_url":"https://api.github.com/users/RamuKammagani-osi/gists{/gist_id}","starred_url":"https://api.github.com/users/RamuKammagani-osi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RamuKammagani-osi/subscriptions","organizations_url":"https://api.github.com/users/RamuKammagani-osi/orgs","repos_url":"https://api.github.com/users/RamuKammagani-osi/repos","events_url":"https://api.github.com/users/RamuKammagani-osi/events{/privacy}","received_events_url":"https://api.github.com/users/RamuKammagani-osi/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195/commits","review_comments_url":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195/comments","review_comment_url":"https://api.github.com/repos/ca-cwds/county-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ca-cwds/county-admin/issues/195/comments","statuses_url":"https://api.github.com/repos/ca-cwds/county-admin/statuses/c16fd8ce6cc4fa8f72be8a0043691cc42385a9a1","head":{"label":"ca-cwds:COG-649-edit-roles","ref":"COG-649-edit-roles","sha":"c16fd8ce6cc4fa8f72be8a0043691cc42385a9a1","user":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":131204807,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEyMDQ4MDc=","name":"county-admin","full_name":"ca-cwds/county-admin","private":false,"owner":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ca-cwds/county-admin","description":null,"fork":false,"url":"https://api.github.com/repos/ca-cwds/county-admin","forks_url":"https://api.github.com/repos/ca-cwds/county-admin/forks","keys_url":"https://api.github.com/repos/ca-cwds/county-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/county-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/county-admin/teams","hooks_url":"https://api.github.com/repos/ca-cwds/county-admin/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/county-admin/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/county-admin/events","assignees_url":"https://api.github.com/repos/ca-cwds/county-admin/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/county-admin/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/county-admin/tags","blobs_url":"https://api.github.com/repos/ca-cwds/county-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/county-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/county-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/county-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/county-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/county-admin/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/county-admin/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/county-admin/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/county-admin/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/county-admin/subscription","commits_url":"https://api.github.com/repos/ca-cwds/county-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/county-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/county-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/county-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/county-admin/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/county-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/county-admin/merges","archive_url":"https://api.github.com/repos/ca-cwds/county-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/county-admin/downloads","issues_url":"https://api.github.com/repos/ca-cwds/county-admin/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/county-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/county-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/county-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/county-admin/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/county-admin/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/county-admin/deployments","created_at":"2018-04-26T20:03:31Z","updated_at":"2018-10-16T15:34:31Z","pushed_at":"2018-10-16T16:29:06Z","git_url":"git://github.com/ca-cwds/county-admin.git","ssh_url":"git@github.com:ca-cwds/county-admin.git","clone_url":"https://github.com/ca-cwds/county-admin.git","svn_url":"https://github.com/ca-cwds/county-admin","homepage":null,"size":1423,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":4,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"ca-cwds:master","ref":"master","sha":"8c4996ff949963ffbee63bb6f5faa263991aaa01","user":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":131204807,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEyMDQ4MDc=","name":"county-admin","full_name":"ca-cwds/county-admin","private":false,"owner":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ca-cwds/county-admin","description":null,"fork":false,"url":"https://api.github.com/repos/ca-cwds/county-admin","forks_url":"https://api.github.com/repos/ca-cwds/county-admin/forks","keys_url":"https://api.github.com/repos/ca-cwds/county-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/county-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/county-admin/teams","hooks_url":"https://api.github.com/repos/ca-cwds/county-admin/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/county-admin/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/county-admin/events","assignees_url":"https://api.github.com/repos/ca-cwds/county-admin/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/county-admin/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/county-admin/tags","blobs_url":"https://api.github.com/repos/ca-cwds/county-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/county-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/county-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/county-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/county-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/county-admin/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/county-admin/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/county-admin/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/county-admin/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/county-admin/subscription","commits_url":"https://api.github.com/repos/ca-cwds/county-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/county-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/county-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/county-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/county-admin/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/county-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/county-admin/merges","archive_url":"https://api.github.com/repos/ca-cwds/county-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/county-admin/downloads","issues_url":"https://api.github.com/repos/ca-cwds/county-admin/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/county-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/county-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/county-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/county-admin/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/county-admin/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/county-admin/deployments","created_at":"2018-04-26T20:03:31Z","updated_at":"2018-10-16T15:34:31Z","pushed_at":"2018-10-16T16:29:06Z","git_url":"git://github.com/ca-cwds/county-admin.git","ssh_url":"git@github.com:ca-cwds/county-admin.git","clone_url":"https://github.com/ca-cwds/county-admin.git","svn_url":"https://github.com/ca-cwds/county-admin","homepage":null,"size":1423,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":4,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195"},"html":{"href":"https://github.com/ca-cwds/county-admin/pull/195"},"issue":{"href":"https://api.github.com/repos/ca-cwds/county-admin/issues/195"},"comments":{"href":"https://api.github.com/repos/ca-cwds/county-admin/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/ca-cwds/county-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ca-cwds/county-admin/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/ca-cwds/county-admin/statuses/c16fd8ce6cc4fa8f72be8a0043691cc42385a9a1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Nasir2712"}}