{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/installer/pulls/comments/218174596","pull_request_review_id":156053420,"id":218174596,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODE3NDU5Ng==","diff_hunk":"@@ -0,0 +1,63 @@\n+package installconfig\n+\n+import (\n+\t\"bufio\"\n+\t\"fmt\"\n+\t\"os\"\n+\n+\t\"github.com/openshift/installer/pkg/asset\"\n+\t\"golang.org/x/crypto/ssh/terminal\"\n+)\n+\n+var (\n+\tpasswordPrompt = fmt.Sprintf(\"Enter password (6-16 characters):\")\n+\treEnterPrompt  = fmt.Sprintf(\"Re-enter password:\")\n+)\n+\n+// password is an asset that queries the user for the password to the cluster\n+//\n+// Contents[0] is the actual string form of the password\n+type password struct {\n+\tInputReader *bufio.Reader\n+}\n+\n+var _ asset.Asset = (*password)(nil)\n+\n+// Dependencies returns no dependencies.\n+func (a *password) Dependencies() []asset.Asset {\n+\treturn []asset.Asset{}\n+}\n+\n+// Generate queries for input from the user.\n+func (a *password) Generate(map[asset.Asset]*asset.State) (*asset.State, error) {\n+\tpassword, err := a.queryUserForPassword()\n+\treturn assetStateForStringContents(password), err\n+}\n+\n+// queryUserForPassword for prompts Stdin for password without echoing anything on screen\n+// TODO: mask the password characters\n+func (a *password) queryUserForPassword() (string, error) {\n+\tfor {\n+\t\tfmt.Printf(passwordPrompt)\n+\t\tinput, err := terminal.ReadPassword(int(os.Stdin.Fd()))\n+\t\tif err != nil {\n+\t\t\tfmt.Printf(\"error in getting pasword %v\", err)\n+\t\t\treturn \"\", err\n+\t\t}\n+\t\tfmt.Println()\n+\t\tif len(input) < 6 || len(input) > 16 {\n+\t\t\tfmt.Println(\"Password length should be 6-16 characters.\")\n+\t\t\tcontinue\n+\t\t}\n+\t\tfmt.Printf(reEnterPrompt)\n+\t\tconfirmInput, err := terminal.ReadPassword(int(os.Stdin.Fd())) //reEnterPrompt)","path":"pkg/asset/installconfig/password.go","position":53,"original_position":53,"commit_id":"24b6c31df2a455a355c3aa91111c6d0fc0bc2759","original_commit_id":"24b6c31df2a455a355c3aa91111c6d0fc0bc2759","user":{"login":"crawford","id":368848,"node_id":"MDQ6VXNlcjM2ODg0OA==","avatar_url":"https://avatars3.githubusercontent.com/u/368848?v=4","gravatar_id":"","url":"https://api.github.com/users/crawford","html_url":"https://github.com/crawford","followers_url":"https://api.github.com/users/crawford/followers","following_url":"https://api.github.com/users/crawford/following{/other_user}","gists_url":"https://api.github.com/users/crawford/gists{/gist_id}","starred_url":"https://api.github.com/users/crawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawford/subscriptions","organizations_url":"https://api.github.com/users/crawford/orgs","repos_url":"https://api.github.com/users/crawford/repos","events_url":"https://api.github.com/users/crawford/events{/privacy}","received_events_url":"https://api.github.com/users/crawford/received_events","type":"User","site_admin":false},"body":"Drop that dangling comment.","created_at":"2018-09-17T18:18:25Z","updated_at":"2018-09-17T18:19:20Z","html_url":"https://github.com/openshift/installer/pull/212#discussion_r218174596","pull_request_url":"https://api.github.com/repos/openshift/installer/pulls/212","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openshift/installer/pulls/comments/218174596"},"html":{"href":"https://github.com/openshift/installer/pull/212#discussion_r218174596"},"pull_request":{"href":"https://api.github.com/repos/openshift/installer/pulls/212"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/installer/pulls/212","id":213443610,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDQzNjEw","html_url":"https://github.com/openshift/installer/pull/212","diff_url":"https://github.com/openshift/installer/pull/212.diff","patch_url":"https://github.com/openshift/installer/pull/212.patch","issue_url":"https://api.github.com/repos/openshift/installer/issues/212","number":212,"state":"open","locked":false,"title":"default values for some fields in install_config","user":{"login":"rajatchopra","id":982221,"node_id":"MDQ6VXNlcjk4MjIyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/982221?v=4","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false},"body":"CORS-820\r\nFollow up work to read values from default file pointers.\r\n\r\n@yifan-gu PTAL. Thanks.\r\n\r\nSigned-off-by: Rajat Chopra <rchopra@redhat.com>\r\n","created_at":"2018-09-05T22:15:49Z","updated_at":"2018-09-17T18:19:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bfc5fb80d05ae43c29d3cac47f054b7f9d84ef8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"aaronlevy","id":374924,"node_id":"MDQ6VXNlcjM3NDkyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/374924?v=4","gravatar_id":"","url":"https://api.github.com/users/aaronlevy","html_url":"https://github.com/aaronlevy","followers_url":"https://api.github.com/users/aaronlevy/followers","following_url":"https://api.github.com/users/aaronlevy/following{/other_user}","gists_url":"https://api.github.com/users/aaronlevy/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlevy/subscriptions","organizations_url":"https://api.github.com/users/aaronlevy/orgs","repos_url":"https://api.github.com/users/aaronlevy/repos","events_url":"https://api.github.com/users/aaronlevy/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlevy/received_events","type":"User","site_admin":false},{"login":"yifan-gu","id":3278588,"node_id":"MDQ6VXNlcjMyNzg1ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/3278588?v=4","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":959732229,"node_id":"MDU6TGFiZWw5NTk3MzIyMjk=","url":"https://api.github.com/repos/openshift/installer/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":959732835,"node_id":"MDU6TGFiZWw5NTk3MzI4MzU=","url":"https://api.github.com/repos/openshift/installer/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/installer/pulls/212/commits","review_comments_url":"https://api.github.com/repos/openshift/installer/pulls/212/comments","review_comment_url":"https://api.github.com/repos/openshift/installer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/installer/issues/212/comments","statuses_url":"https://api.github.com/repos/openshift/installer/statuses/24b6c31df2a455a355c3aa91111c6d0fc0bc2759","head":{"label":"rajatchopra:default_user_values","ref":"default_user_values","sha":"24b6c31df2a455a355c3aa91111c6d0fc0bc2759","user":{"login":"rajatchopra","id":982221,"node_id":"MDQ6VXNlcjk4MjIyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/982221?v=4","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false},"repo":{"id":143057825,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMwNTc4MjU=","name":"installer","full_name":"rajatchopra/installer","private":false,"owner":{"login":"rajatchopra","id":982221,"node_id":"MDQ6VXNlcjk4MjIyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/982221?v=4","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rajatchopra/installer","description":"Install an OpenShift cluster","fork":true,"url":"https://api.github.com/repos/rajatchopra/installer","forks_url":"https://api.github.com/repos/rajatchopra/installer/forks","keys_url":"https://api.github.com/repos/rajatchopra/installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajatchopra/installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajatchopra/installer/teams","hooks_url":"https://api.github.com/repos/rajatchopra/installer/hooks","issue_events_url":"https://api.github.com/repos/rajatchopra/installer/issues/events{/number}","events_url":"https://api.github.com/repos/rajatchopra/installer/events","assignees_url":"https://api.github.com/repos/rajatchopra/installer/assignees{/user}","branches_url":"https://api.github.com/repos/rajatchopra/installer/branches{/branch}","tags_url":"https://api.github.com/repos/rajatchopra/installer/tags","blobs_url":"https://api.github.com/repos/rajatchopra/installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajatchopra/installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajatchopra/installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajatchopra/installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajatchopra/installer/statuses/{sha}","languages_url":"https://api.github.com/repos/rajatchopra/installer/languages","stargazers_url":"https://api.github.com/repos/rajatchopra/installer/stargazers","contributors_url":"https://api.github.com/repos/rajatchopra/installer/contributors","subscribers_url":"https://api.github.com/repos/rajatchopra/installer/subscribers","subscription_url":"https://api.github.com/repos/rajatchopra/installer/subscription","commits_url":"https://api.github.com/repos/rajatchopra/installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajatchopra/installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajatchopra/installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajatchopra/installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajatchopra/installer/contents/{+path}","compare_url":"https://api.github.com/repos/rajatchopra/installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajatchopra/installer/merges","archive_url":"https://api.github.com/repos/rajatchopra/installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajatchopra/installer/downloads","issues_url":"https://api.github.com/repos/rajatchopra/installer/issues{/number}","pulls_url":"https://api.github.com/repos/rajatchopra/installer/pulls{/number}","milestones_url":"https://api.github.com/repos/rajatchopra/installer/milestones{/number}","notifications_url":"https://api.github.com/repos/rajatchopra/installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajatchopra/installer/labels{/name}","releases_url":"https://api.github.com/repos/rajatchopra/installer/releases{/id}","deployments_url":"https://api.github.com/repos/rajatchopra/installer/deployments","created_at":"2018-07-31T19:24:28Z","updated_at":"2018-08-10T23:29:03Z","pushed_at":"2018-09-14T00:18:10Z","git_url":"git://github.com/rajatchopra/installer.git","ssh_url":"git@github.com:rajatchopra/installer.git","clone_url":"https://github.com/rajatchopra/installer.git","svn_url":"https://github.com/rajatchopra/installer","homepage":"","size":38714,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"2457075bdc5db1dc9c4d5a45891dd3c2a8215ff3","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":136633680,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2MzM2ODA=","name":"installer","full_name":"openshift/installer","private":false,"owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openshift/installer","description":"Install an OpenShift cluster","fork":false,"url":"https://api.github.com/repos/openshift/installer","forks_url":"https://api.github.com/repos/openshift/installer/forks","keys_url":"https://api.github.com/repos/openshift/installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/installer/teams","hooks_url":"https://api.github.com/repos/openshift/installer/hooks","issue_events_url":"https://api.github.com/repos/openshift/installer/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/installer/events","assignees_url":"https://api.github.com/repos/openshift/installer/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/installer/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/installer/tags","blobs_url":"https://api.github.com/repos/openshift/installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/installer/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/installer/languages","stargazers_url":"https://api.github.com/repos/openshift/installer/stargazers","contributors_url":"https://api.github.com/repos/openshift/installer/contributors","subscribers_url":"https://api.github.com/repos/openshift/installer/subscribers","subscription_url":"https://api.github.com/repos/openshift/installer/subscription","commits_url":"https://api.github.com/repos/openshift/installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/installer/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/installer/merges","archive_url":"https://api.github.com/repos/openshift/installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/installer/downloads","issues_url":"https://api.github.com/repos/openshift/installer/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/installer/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/installer/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/installer/labels{/name}","releases_url":"https://api.github.com/repos/openshift/installer/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/installer/deployments","created_at":"2018-06-08T15:04:41Z","updated_at":"2018-09-17T17:42:58Z","pushed_at":"2018-09-17T17:42:59Z","git_url":"git://github.com/openshift/installer.git","ssh_url":"git@github.com:openshift/installer.git","clone_url":"https://github.com/openshift/installer.git","svn_url":"https://github.com/openshift/installer","homepage":"","size":38729,"stargazers_count":40,"watchers_count":40,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":47,"open_issues":20,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/installer/pulls/212"},"html":{"href":"https://github.com/openshift/installer/pull/212"},"issue":{"href":"https://api.github.com/repos/openshift/installer/issues/212"},"comments":{"href":"https://api.github.com/repos/openshift/installer/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/installer/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/installer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/installer/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/installer/statuses/24b6c31df2a455a355c3aa91111c6d0fc0bc2759"}},"author_association":"NONE"}}
{"actor":{"display_login":"crawford"}}