{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/dcos/pulls/comments/87921892","pull_request_review_id":8513141,"id":87921892,"diff_hunk":"@@ -5,45 +5,54 @@\n \n \n def test_default_arg_parser():\n-    parser = cli.parse_args([])\n+    parser = cli.get_argument_parser().parse_args([])\n     assert parser.verbose is False\n     assert parser.port == 9000\n-    assert parser.action is None\n+    assert parser.action == 'genconf'\n \n \n def test_set_arg_parser():\n-    parser = cli.parse_args(['-v', '-p 12345'])\n+    argument_parser = cli.get_argument_parser()\n+\n+    def parse_args(arg_list):\n+        return argument_parser.parse_args(arg_list)\n+\n+    parser = parse_args(['-v', '-p 12345'])\n     assert parser.verbose is True\n     assert parser.port == 12345\n-    parser = cli.parse_args(['--web'])\n+    parser = parse_args(['--web'])\n     assert parser.action == 'web'\n-    parser = cli.parse_args(['--genconf'])\n+    parser = parse_args(['--genconf'])\n     assert parser.action == 'genconf'\n-    parser = cli.parse_args(['--preflight'])\n+    parser = parse_args(['--preflight'])\n     assert parser.action == 'preflight'\n-    parser = cli.parse_args(['--postflight'])\n+    parser = parse_args(['--postflight'])\n     assert parser.action == 'postflight'\n-    parser = cli.parse_args(['--deploy'])\n+    parser = parse_args(['--deploy'])\n     assert parser.action == 'deploy'\n-    parser = cli.parse_args(['--validate-config'])\n+    parser = parse_args(['--validate-config'])\n     assert parser.action == 'validate-config'\n-    parser = cli.parse_args(['--uninstall'])\n+    parser = parse_args(['--uninstall'])\n     assert parser.action == 'uninstall'\n-    parser = cli.parse_args(['--hash-password', 'foo'])\n-    assert parser.hash_password == ['foo']\n-    assert parser.action is None\n+    parser = parse_args(['--hash-password', 'foo'])\n+    assert parser.password == 'foo'\n+    assert parser.action == '--hash-password'","path":"tests/test_installer_init.py","position":null,"original_position":48,"commit_id":"46166d2cb3ed48627c4680c52d373187f80d8e86","original_commit_id":"0a969118e847b7a4ae84634133d5a4f516dc4731","user":{"login":"cmaloney","id":751088,"avatar_url":"https://avatars.githubusercontent.com/u/751088?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaloney","html_url":"https://github.com/cmaloney","followers_url":"https://api.github.com/users/cmaloney/followers","following_url":"https://api.github.com/users/cmaloney/following{/other_user}","gists_url":"https://api.github.com/users/cmaloney/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaloney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaloney/subscriptions","organizations_url":"https://api.github.com/users/cmaloney/orgs","repos_url":"https://api.github.com/users/cmaloney/repos","events_url":"https://api.github.com/users/cmaloney/events{/privacy}","received_events_url":"https://api.github.com/users/cmaloney/received_events","type":"User","site_admin":false},"body":"Updatted PasswordAction to strip off the `--`","created_at":"2016-11-15T00:01:09Z","updated_at":"2016-11-15T00:01:09Z","html_url":"https://github.com/dcos/dcos/pull/937#discussion_r87921892","pull_request_url":"https://api.github.com/repos/dcos/dcos/pulls/937","_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos/pulls/comments/87921892"},"html":{"href":"https://github.com/dcos/dcos/pull/937#discussion_r87921892"},"pull_request":{"href":"https://api.github.com/repos/dcos/dcos/pulls/937"}}},"pull_request":{"url":"https://api.github.com/repos/dcos/dcos/pulls/937","id":92431585,"html_url":"https://github.com/dcos/dcos/pull/937","diff_url":"https://github.com/dcos/dcos/pull/937.diff","patch_url":"https://github.com/dcos/dcos/pull/937.patch","issue_url":"https://api.github.com/repos/dcos/dcos/issues/937","number":937,"state":"open","locked":false,"title":"making argparse use sys.argv so it auto picks up argv[0]","user":{"login":"cmaloney","id":751088,"avatar_url":"https://avatars.githubusercontent.com/u/751088?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaloney","html_url":"https://github.com/cmaloney","followers_url":"https://api.github.com/users/cmaloney/followers","following_url":"https://api.github.com/users/cmaloney/following{/other_user}","gists_url":"https://api.github.com/users/cmaloney/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaloney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaloney/subscriptions","organizations_url":"https://api.github.com/users/cmaloney/orgs","repos_url":"https://api.github.com/users/cmaloney/repos","events_url":"https://api.github.com/users/cmaloney/events{/privacy}","received_events_url":"https://api.github.com/users/cmaloney/received_events","type":"User","site_admin":false},"body":"dcos_generate_config.sh --help goes from:\r\n\r\n```\r\ndcos_installer <...>\r\n```\r\n\r\nto:\r\n\r\n```\r\ndcos_generate_config.sh <...>\r\n```\r\n\r\nShould help reduce customer confusion (dcos_installer sounds a lot like dcos_install.sh)\r\n\r\nIn order to change that, how the \"password\" arguments are handled was also changed to use a custom argparse action which makes a simpler to understand API for which mode they should go into (Hash the given password vs. no password given prompt for one).\r\n\r\n# Issues\r\n\r\nhttps://mesosphere.slack.com/archives/documentation/p1477923100001079\r\n\r\n# Checklist\r\n\r\n - [x] Included a test which will fail if code is reverted but test is not\r\n - [x] Followed relevant code rules [Rules for Packages and Systemd](https://github.com/dcos/dcos/tree/master/docs)","created_at":"2016-11-04T23:34:07Z","updated_at":"2016-11-15T00:01:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26d45421bc108a19a48f4b3f1be5c9eb5323caea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos/pulls/937/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos/pulls/937/comments","review_comment_url":"https://api.github.com/repos/dcos/dcos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcos/dcos/issues/937/comments","statuses_url":"https://api.github.com/repos/dcos/dcos/statuses/46166d2cb3ed48627c4680c52d373187f80d8e86","head":{"label":"cmaloney:d_installer","ref":"d_installer","sha":"46166d2cb3ed48627c4680c52d373187f80d8e86","user":{"login":"cmaloney","id":751088,"avatar_url":"https://avatars.githubusercontent.com/u/751088?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaloney","html_url":"https://github.com/cmaloney","followers_url":"https://api.github.com/users/cmaloney/followers","following_url":"https://api.github.com/users/cmaloney/following{/other_user}","gists_url":"https://api.github.com/users/cmaloney/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaloney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaloney/subscriptions","organizations_url":"https://api.github.com/users/cmaloney/orgs","repos_url":"https://api.github.com/users/cmaloney/repos","events_url":"https://api.github.com/users/cmaloney/events{/privacy}","received_events_url":"https://api.github.com/users/cmaloney/received_events","type":"User","site_admin":false},"repo":{"id":56587823,"name":"dcos","full_name":"cmaloney/dcos","owner":{"login":"cmaloney","id":751088,"avatar_url":"https://avatars.githubusercontent.com/u/751088?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaloney","html_url":"https://github.com/cmaloney","followers_url":"https://api.github.com/users/cmaloney/followers","following_url":"https://api.github.com/users/cmaloney/following{/other_user}","gists_url":"https://api.github.com/users/cmaloney/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaloney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaloney/subscriptions","organizations_url":"https://api.github.com/users/cmaloney/orgs","repos_url":"https://api.github.com/users/cmaloney/repos","events_url":"https://api.github.com/users/cmaloney/events{/privacy}","received_events_url":"https://api.github.com/users/cmaloney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmaloney/dcos","description":"DC/OS Build and Release tools","fork":true,"url":"https://api.github.com/repos/cmaloney/dcos","forks_url":"https://api.github.com/repos/cmaloney/dcos/forks","keys_url":"https://api.github.com/repos/cmaloney/dcos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmaloney/dcos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmaloney/dcos/teams","hooks_url":"https://api.github.com/repos/cmaloney/dcos/hooks","issue_events_url":"https://api.github.com/repos/cmaloney/dcos/issues/events{/number}","events_url":"https://api.github.com/repos/cmaloney/dcos/events","assignees_url":"https://api.github.com/repos/cmaloney/dcos/assignees{/user}","branches_url":"https://api.github.com/repos/cmaloney/dcos/branches{/branch}","tags_url":"https://api.github.com/repos/cmaloney/dcos/tags","blobs_url":"https://api.github.com/repos/cmaloney/dcos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmaloney/dcos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmaloney/dcos/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmaloney/dcos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmaloney/dcos/statuses/{sha}","languages_url":"https://api.github.com/repos/cmaloney/dcos/languages","stargazers_url":"https://api.github.com/repos/cmaloney/dcos/stargazers","contributors_url":"https://api.github.com/repos/cmaloney/dcos/contributors","subscribers_url":"https://api.github.com/repos/cmaloney/dcos/subscribers","subscription_url":"https://api.github.com/repos/cmaloney/dcos/subscription","commits_url":"https://api.github.com/repos/cmaloney/dcos/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmaloney/dcos/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmaloney/dcos/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmaloney/dcos/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmaloney/dcos/contents/{+path}","compare_url":"https://api.github.com/repos/cmaloney/dcos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmaloney/dcos/merges","archive_url":"https://api.github.com/repos/cmaloney/dcos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmaloney/dcos/downloads","issues_url":"https://api.github.com/repos/cmaloney/dcos/issues{/number}","pulls_url":"https://api.github.com/repos/cmaloney/dcos/pulls{/number}","milestones_url":"https://api.github.com/repos/cmaloney/dcos/milestones{/number}","notifications_url":"https://api.github.com/repos/cmaloney/dcos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmaloney/dcos/labels{/name}","releases_url":"https://api.github.com/repos/cmaloney/dcos/releases{/id}","deployments_url":"https://api.github.com/repos/cmaloney/dcos/deployments","created_at":"2016-04-19T10:33:02Z","updated_at":"2016-04-19T10:33:03Z","pushed_at":"2016-11-15T00:01:08Z","git_url":"git://github.com/cmaloney/dcos.git","ssh_url":"git@github.com:cmaloney/dcos.git","clone_url":"https://github.com/cmaloney/dcos.git","svn_url":"https://github.com/cmaloney/dcos","homepage":null,"size":2164,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"af1d8f4c4858c1db631db7ff6eb9806cf14e714c","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56184050,"name":"dcos","full_name":"dcos/dcos","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos","description":"DC/OS Build and Release tools","fork":false,"url":"https://api.github.com/repos/dcos/dcos","forks_url":"https://api.github.com/repos/dcos/dcos/forks","keys_url":"https://api.github.com/repos/dcos/dcos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos/teams","hooks_url":"https://api.github.com/repos/dcos/dcos/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos/events","assignees_url":"https://api.github.com/repos/dcos/dcos/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos/tags","blobs_url":"https://api.github.com/repos/dcos/dcos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos/subscription","commits_url":"https://api.github.com/repos/dcos/dcos/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos/merges","archive_url":"https://api.github.com/repos/dcos/dcos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos/downloads","issues_url":"https://api.github.com/repos/dcos/dcos/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos/deployments","created_at":"2016-04-13T20:31:58Z","updated_at":"2016-11-14T16:16:52Z","pushed_at":"2016-11-15T00:01:09Z","git_url":"git://github.com/dcos/dcos.git","ssh_url":"git@github.com:dcos/dcos.git","clone_url":"https://github.com/dcos/dcos.git","svn_url":"https://github.com/dcos/dcos","homepage":"https://dcos.io","size":3256,"stargazers_count":1097,"watchers_count":1097,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":180,"mirror_url":null,"open_issues_count":46,"forks":180,"open_issues":46,"watchers":1097,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos/pulls/937"},"html":{"href":"https://github.com/dcos/dcos/pull/937"},"issue":{"href":"https://api.github.com/repos/dcos/dcos/issues/937"},"comments":{"href":"https://api.github.com/repos/dcos/dcos/issues/937/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos/pulls/937/comments"},"review_comment":{"href":"https://api.github.com/repos/dcos/dcos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcos/dcos/pulls/937/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos/statuses/46166d2cb3ed48627c4680c52d373187f80d8e86"}}}}
{"actor":{"display_login":"cmaloney"}}