{"action":"created","comment":{"url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/comments/226163852","pull_request_review_id":165918461,"id":226163852,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjE2Mzg1Mg==","diff_hunk":"@@ -0,0 +1,89 @@\n+\"\"\"Command parsing for user events.\"\"\"\n+import argparse\n+import shlex\n+\n+\n+class UserCommand:\n+    \"\"\"Represent User Command Parser.\"\"\"\n+\n+    __command_name = \"user\"\n+    __help = \"User Command Reference:\\n\\n @rocket user\\n\\n Options:\\n\\n edit \\n --name NAME\\n\" \\\n+             \" --email ADDRESS\\n --pos YOURPOSITION\\n --major YOURMAJOR\\n --bio YOURBIO\\n 'edit properties of your\" \\\n+             \"Launch Pad profile\\n surround arguments with spaces with single quotes'\" \\\n+             \"\\n ADMIN/TEAM LEAD ONLY option: --member MEMBER_ID\\n 'edit properties of another\" \\\n+             \"user's Launch Pad profile'\\n\\n view MEMBER_ID\\n 'view information about a user'\\n\\n \" \\\n+             \"help\\n 'outputs options for user commands'\\n\\n \" \\\n+             \"ADMIN ONLY\\n\\n delete MEMBER_ID\\n 'permanently delete member's Launch Pad profile'\"\n+\n+    \"\"\"Top level User parser.\"\"\"\n+    parser = argparse.ArgumentParser(prog=\"user\")\n+    parser.add_argument(\"user\")\n+    subparsers = parser.add_subparsers()\n+\n+    \"\"\"Parser for view command.\"\"\"\n+    parser_view = subparsers.add_parser(\"view\")\n+    parser_view.set_defaults(which=\"view\")\n+    parser_view.add_argument(\"slack_id\", type=str, action='store')\n+\n+    \"\"\"Parser for help command.\"\"\"\n+    parser_help = subparsers.add_parser(\"help\")\n+    parser_help.set_defaults(which=\"help\")\n+\n+    \"\"\"Parser for delete command.\"\"\"\n+    parser_delete = subparsers.add_parser(\"delete\")\n+    parser_delete.set_defaults(which=\"delete\")\n+    parser_delete.add_argument(\"slack_id\", type=str, action='store')\n+\n+    \"\"\"Parser for edit command.\"\"\"\n+    parser_edit = subparsers.add_parser(\"edit\")\n+    parser_edit.set_defaults(which='edit')\n+    parser_edit.add_argument(\"--name\", type=str, action='store')\n+    parser_edit.add_argument(\"--email\", type=str, action='store')\n+    parser_edit.add_argument(\"--pos\", type=str, action='store')\n+    parser_edit.add_argument(\"--github\", type=str, action='store')\n+    parser_edit.add_argument(\"--major\", type=str, action='store')\n+    parser_edit.add_argument(\"--bio\", type=str, action='store')\n+    parser_edit.add_argument(\"--member\", type=str, action='store')\n+\n+    def get_name(self):\n+        \"\"\"Return the command type.\"\"\"\n+        return self.__command_name\n+\n+    def get_help(self):\n+        \"\"\"Return command options for user events.\"\"\"\n+        return self.__help\n+\n+    def handle(self, command):","path":"command/commands/user.py","position":56,"original_position":56,"commit_id":"fe25ea6ba2e0a8f4f1760de0ffac9bbac9202e49","original_commit_id":"a5c5c774ce5c1257342250c2ce91fcbb0bebc21e","user":{"login":"rwblickhan","id":13651149,"node_id":"MDQ6VXNlcjEzNjUxMTQ5","avatar_url":"https://avatars3.githubusercontent.com/u/13651149?v=4","gravatar_id":"","url":"https://api.github.com/users/rwblickhan","html_url":"https://github.com/rwblickhan","followers_url":"https://api.github.com/users/rwblickhan/followers","following_url":"https://api.github.com/users/rwblickhan/following{/other_user}","gists_url":"https://api.github.com/users/rwblickhan/gists{/gist_id}","starred_url":"https://api.github.com/users/rwblickhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwblickhan/subscriptions","organizations_url":"https://api.github.com/users/rwblickhan/orgs","repos_url":"https://api.github.com/users/rwblickhan/repos","events_url":"https://api.github.com/users/rwblickhan/events{/privacy}","received_events_url":"https://api.github.com/users/rwblickhan/received_events","type":"User","site_admin":false},"body":"One thing that I forgot about is that we'll want to have some way to tell what user sent the command, for permissions purposes, so eventually this will have to change to accommodate that - I'm thinking that the easiest way to do that would be to add an extra parameter for \"permissions level\" and then Robin's \"core framework\" would be responsible for determining what the correct permissions level is (though then that begs the question of how the core framework can tell...).","created_at":"2018-10-18T04:13:03Z","updated_at":"2018-10-18T04:14:35Z","html_url":"https://github.com/ubclaunchpad/rocket2.0/pull/49#discussion_r226163852","pull_request_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/comments/226163852"},"html":{"href":"https://github.com/ubclaunchpad/rocket2.0/pull/49#discussion_r226163852"},"pull_request":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49","id":223818799,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzODE4Nzk5","html_url":"https://github.com/ubclaunchpad/rocket2.0/pull/49","diff_url":"https://github.com/ubclaunchpad/rocket2.0/pull/49.diff","patch_url":"https://github.com/ubclaunchpad/rocket2.0/pull/49.patch","issue_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/49","number":49,"state":"open","locked":false,"title":"Added user command class with parsers and handler stubs","user":{"login":"jacqueschen1","id":41420178,"node_id":"MDQ6VXNlcjQxNDIwMTc4","avatar_url":"https://avatars2.githubusercontent.com/u/41420178?v=4","gravatar_id":"","url":"https://api.github.com/users/jacqueschen1","html_url":"https://github.com/jacqueschen1","followers_url":"https://api.github.com/users/jacqueschen1/followers","following_url":"https://api.github.com/users/jacqueschen1/following{/other_user}","gists_url":"https://api.github.com/users/jacqueschen1/gists{/gist_id}","starred_url":"https://api.github.com/users/jacqueschen1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacqueschen1/subscriptions","organizations_url":"https://api.github.com/users/jacqueschen1/orgs","repos_url":"https://api.github.com/users/jacqueschen1/repos","events_url":"https://api.github.com/users/jacqueschen1/events{/privacy}","received_events_url":"https://api.github.com/users/jacqueschen1/received_events","type":"User","site_admin":false},"body":"# Pull Request\r\n\r\n## Description\r\n\r\nGive a brief description of your changes:\r\nAdded user command class with parsers using argparse and handler stubs. Test class also added.\r\n\r\n## Testing\r\n\r\nIf testing this change requires extra setup, please document it here:\r\n\r\n## Ticket(s)\r\n\r\nAffects #31 \r\n\r\n(Create a copy of that line for each Github Issue affected,\r\nand replace \"Affects\" with \"Closes\" if merging this will close the relevant ticket.)\r\n","created_at":"2018-10-18T03:59:50Z","updated_at":"2018-10-18T04:14:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa7e18fae44c3ac715249c891525d062928603ea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49/commits","review_comments_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49/comments","review_comment_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/49/comments","statuses_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/statuses/fe25ea6ba2e0a8f4f1760de0ffac9bbac9202e49","head":{"label":"ubclaunchpad:jacqueschen1/#31-usercommand","ref":"jacqueschen1/#31-usercommand","sha":"fe25ea6ba2e0a8f4f1760de0ffac9bbac9202e49","user":{"login":"ubclaunchpad","id":12406312,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2MzEy","avatar_url":"https://avatars3.githubusercontent.com/u/12406312?v=4","gravatar_id":"","url":"https://api.github.com/users/ubclaunchpad","html_url":"https://github.com/ubclaunchpad","followers_url":"https://api.github.com/users/ubclaunchpad/followers","following_url":"https://api.github.com/users/ubclaunchpad/following{/other_user}","gists_url":"https://api.github.com/users/ubclaunchpad/gists{/gist_id}","starred_url":"https://api.github.com/users/ubclaunchpad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubclaunchpad/subscriptions","organizations_url":"https://api.github.com/users/ubclaunchpad/orgs","repos_url":"https://api.github.com/users/ubclaunchpad/repos","events_url":"https://api.github.com/users/ubclaunchpad/events{/privacy}","received_events_url":"https://api.github.com/users/ubclaunchpad/received_events","type":"Organization","site_admin":false},"repo":{"id":150890738,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA4OTA3Mzg=","name":"rocket2.0","full_name":"ubclaunchpad/rocket2.0","private":false,"owner":{"login":"ubclaunchpad","id":12406312,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2MzEy","avatar_url":"https://avatars3.githubusercontent.com/u/12406312?v=4","gravatar_id":"","url":"https://api.github.com/users/ubclaunchpad","html_url":"https://github.com/ubclaunchpad","followers_url":"https://api.github.com/users/ubclaunchpad/followers","following_url":"https://api.github.com/users/ubclaunchpad/following{/other_user}","gists_url":"https://api.github.com/users/ubclaunchpad/gists{/gist_id}","starred_url":"https://api.github.com/users/ubclaunchpad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubclaunchpad/subscriptions","organizations_url":"https://api.github.com/users/ubclaunchpad/orgs","repos_url":"https://api.github.com/users/ubclaunchpad/repos","events_url":"https://api.github.com/users/ubclaunchpad/events{/privacy}","received_events_url":"https://api.github.com/users/ubclaunchpad/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ubclaunchpad/rocket2.0","description":"🚀 Slack bot, team management, and onboarding system for UBC Launch Pad","fork":false,"url":"https://api.github.com/repos/ubclaunchpad/rocket2.0","forks_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/forks","keys_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/teams","hooks_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/hooks","issue_events_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/events{/number}","events_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/events","assignees_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/assignees{/user}","branches_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/branches{/branch}","tags_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/tags","blobs_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/statuses/{sha}","languages_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/languages","stargazers_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/stargazers","contributors_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/contributors","subscribers_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/subscribers","subscription_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/subscription","commits_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/contents/{+path}","compare_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/merges","archive_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/downloads","issues_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues{/number}","pulls_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls{/number}","milestones_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/milestones{/number}","notifications_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/labels{/name}","releases_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/releases{/id}","deployments_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/deployments","created_at":"2018-09-29T18:11:17Z","updated_at":"2018-10-18T03:41:45Z","pushed_at":"2018-10-18T04:12:10Z","git_url":"git://github.com/ubclaunchpad/rocket2.0.git","ssh_url":"git@github.com:ubclaunchpad/rocket2.0.git","clone_url":"https://github.com/ubclaunchpad/rocket2.0.git","svn_url":"https://github.com/ubclaunchpad/rocket2.0","homepage":"","size":8929,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":21,"watchers":3,"default_branch":"master"}},"base":{"label":"ubclaunchpad:master","ref":"master","sha":"1b816a260b63ea8623c75eaa40d139287aed12cb","user":{"login":"ubclaunchpad","id":12406312,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2MzEy","avatar_url":"https://avatars3.githubusercontent.com/u/12406312?v=4","gravatar_id":"","url":"https://api.github.com/users/ubclaunchpad","html_url":"https://github.com/ubclaunchpad","followers_url":"https://api.github.com/users/ubclaunchpad/followers","following_url":"https://api.github.com/users/ubclaunchpad/following{/other_user}","gists_url":"https://api.github.com/users/ubclaunchpad/gists{/gist_id}","starred_url":"https://api.github.com/users/ubclaunchpad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubclaunchpad/subscriptions","organizations_url":"https://api.github.com/users/ubclaunchpad/orgs","repos_url":"https://api.github.com/users/ubclaunchpad/repos","events_url":"https://api.github.com/users/ubclaunchpad/events{/privacy}","received_events_url":"https://api.github.com/users/ubclaunchpad/received_events","type":"Organization","site_admin":false},"repo":{"id":150890738,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA4OTA3Mzg=","name":"rocket2.0","full_name":"ubclaunchpad/rocket2.0","private":false,"owner":{"login":"ubclaunchpad","id":12406312,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2MzEy","avatar_url":"https://avatars3.githubusercontent.com/u/12406312?v=4","gravatar_id":"","url":"https://api.github.com/users/ubclaunchpad","html_url":"https://github.com/ubclaunchpad","followers_url":"https://api.github.com/users/ubclaunchpad/followers","following_url":"https://api.github.com/users/ubclaunchpad/following{/other_user}","gists_url":"https://api.github.com/users/ubclaunchpad/gists{/gist_id}","starred_url":"https://api.github.com/users/ubclaunchpad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubclaunchpad/subscriptions","organizations_url":"https://api.github.com/users/ubclaunchpad/orgs","repos_url":"https://api.github.com/users/ubclaunchpad/repos","events_url":"https://api.github.com/users/ubclaunchpad/events{/privacy}","received_events_url":"https://api.github.com/users/ubclaunchpad/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ubclaunchpad/rocket2.0","description":"🚀 Slack bot, team management, and onboarding system for UBC Launch Pad","fork":false,"url":"https://api.github.com/repos/ubclaunchpad/rocket2.0","forks_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/forks","keys_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/teams","hooks_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/hooks","issue_events_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/events{/number}","events_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/events","assignees_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/assignees{/user}","branches_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/branches{/branch}","tags_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/tags","blobs_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/statuses/{sha}","languages_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/languages","stargazers_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/stargazers","contributors_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/contributors","subscribers_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/subscribers","subscription_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/subscription","commits_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/contents/{+path}","compare_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/merges","archive_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/downloads","issues_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues{/number}","pulls_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls{/number}","milestones_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/milestones{/number}","notifications_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/labels{/name}","releases_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/releases{/id}","deployments_url":"https://api.github.com/repos/ubclaunchpad/rocket2.0/deployments","created_at":"2018-09-29T18:11:17Z","updated_at":"2018-10-18T03:41:45Z","pushed_at":"2018-10-18T04:12:10Z","git_url":"git://github.com/ubclaunchpad/rocket2.0.git","ssh_url":"git@github.com:ubclaunchpad/rocket2.0.git","clone_url":"https://github.com/ubclaunchpad/rocket2.0.git","svn_url":"https://github.com/ubclaunchpad/rocket2.0","homepage":"","size":8929,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":21,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49"},"html":{"href":"https://github.com/ubclaunchpad/rocket2.0/pull/49"},"issue":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/49"},"comments":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/ubclaunchpad/rocket2.0/statuses/fe25ea6ba2e0a8f4f1760de0ffac9bbac9202e49"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rwblickhan"}}