{"action":"created","comment":{"url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/comments/230193210","pull_request_review_id":170877107,"id":230193210,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDE5MzIxMA==","diff_hunk":"@@ -0,0 +1,59 @@\n+const inquirer = require('inquirer');\n+const { getFrontendPlugins } = require('../../extensions/amplify-helpers/get-frontend-plugins');\n+const { getResourceOutputs } = require('../../extensions/amplify-helpers/get-resource-outputs');\n+\n+async function run(context) {\n+  const frontendPlugins = getFrontendPlugins(context);\n+  const { frontend } = context.exeInfo.projectConfig;\n+\n+  const selectedFrontend = await configreFrontendHandler(context, frontendPlugins, frontend);\n+\n+  if (selectedFrontend !== frontend) {\n+    delete context.exeInfo.projectConfig[frontend];\n+    const frontendModule = require(frontendPlugins[selectedFrontend]);\n+    await frontendModule.init(context)\n+      .then(() => frontendModule.createFrontendConfigs(context, getResourceOutputs()));\n+    context.exeInfo.projectConfig.frontend = selectedFrontend;\n+  } else {\n+    const frontendModule = require(frontendPlugins[selectedFrontend]);\n+    await frontendModule.configure(context);\n+  }\n+\n+  return context;\n+}\n+\n+async function configreFrontendHandler(context, frontendPlugins, currentFrontend) {","path":"packages/amplify-cli/src/lib/config-steps/c1-configFrontend.js","position":25,"original_position":25,"commit_id":"5ab2a95ec63588515516e1f088b7f75e11293081","original_commit_id":"f5b4cb4280f2fef03bc187c7f53bf4eb3ba0e0b5","user":{"login":"UnleashedMind","id":6025263,"node_id":"MDQ6VXNlcjYwMjUyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6025263?v=4","gravatar_id":"","url":"https://api.github.com/users/UnleashedMind","html_url":"https://github.com/UnleashedMind","followers_url":"https://api.github.com/users/UnleashedMind/followers","following_url":"https://api.github.com/users/UnleashedMind/following{/other_user}","gists_url":"https://api.github.com/users/UnleashedMind/gists{/gist_id}","starred_url":"https://api.github.com/users/UnleashedMind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnleashedMind/subscriptions","organizations_url":"https://api.github.com/users/UnleashedMind/orgs","repos_url":"https://api.github.com/users/UnleashedMind/repos","events_url":"https://api.github.com/users/UnleashedMind/events{/privacy}","received_events_url":"https://api.github.com/users/UnleashedMind/received_events","type":"User","site_admin":false},"body":"check","created_at":"2018-11-01T20:49:52Z","updated_at":"2018-11-01T20:49:53Z","html_url":"https://github.com/aws-amplify/amplify-cli/pull/371#discussion_r230193210","pull_request_url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/comments/230193210"},"html":{"href":"https://github.com/aws-amplify/amplify-cli/pull/371#discussion_r230193210"},"pull_request":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371"}},"in_reply_to_id":229858989},"pull_request":{"url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371","id":226759889,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NzU5ODg5","html_url":"https://github.com/aws-amplify/amplify-cli/pull/371","diff_url":"https://github.com/aws-amplify/amplify-cli/pull/371.diff","patch_url":"https://github.com/aws-amplify/amplify-cli/pull/371.patch","issue_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/371","number":371,"state":"open","locked":false,"title":"Headless Init and Configure","user":{"login":"UnleashedMind","id":6025263,"node_id":"MDQ6VXNlcjYwMjUyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6025263?v=4","gravatar_id":"","url":"https://api.github.com/users/UnleashedMind","html_url":"https://github.com/UnleashedMind","followers_url":"https://api.github.com/users/UnleashedMind/followers","following_url":"https://api.github.com/users/UnleashedMind/following{/other_user}","gists_url":"https://api.github.com/users/UnleashedMind/gists{/gist_id}","starred_url":"https://api.github.com/users/UnleashedMind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnleashedMind/subscriptions","organizations_url":"https://api.github.com/users/UnleashedMind/orgs","repos_url":"https://api.github.com/users/UnleashedMind/repos","events_url":"https://api.github.com/users/UnleashedMind/events{/privacy}","received_events_url":"https://api.github.com/users/UnleashedMind/received_events","type":"User","site_admin":false},"body":"- Headless init and configure command implemented.\r\n- --yes flag implemented for the init command.\r\n- Simplified the project-config.json file content structure\r\n\r\nUse the following two bash shell scripts as examples to test the headless execution of the init and configure commands\r\n`packages/amplify-cli/tests/amplify-helpers/headless-init.sh`\r\n`packages/amplify-cli/tests/amplify-helpers/headless-config.sh`\r\n\r\nBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.","created_at":"2018-10-30T00:58:58Z","updated_at":"2018-11-01T20:49:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"069231a953f4c2930f45a013d922a1f527cf418f","assignee":{"login":"UnleashedMind","id":6025263,"node_id":"MDQ6VXNlcjYwMjUyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6025263?v=4","gravatar_id":"","url":"https://api.github.com/users/UnleashedMind","html_url":"https://github.com/UnleashedMind","followers_url":"https://api.github.com/users/UnleashedMind/followers","following_url":"https://api.github.com/users/UnleashedMind/following{/other_user}","gists_url":"https://api.github.com/users/UnleashedMind/gists{/gist_id}","starred_url":"https://api.github.com/users/UnleashedMind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnleashedMind/subscriptions","organizations_url":"https://api.github.com/users/UnleashedMind/orgs","repos_url":"https://api.github.com/users/UnleashedMind/repos","events_url":"https://api.github.com/users/UnleashedMind/events{/privacy}","received_events_url":"https://api.github.com/users/UnleashedMind/received_events","type":"User","site_admin":false},"assignees":[{"login":"UnleashedMind","id":6025263,"node_id":"MDQ6VXNlcjYwMjUyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6025263?v=4","gravatar_id":"","url":"https://api.github.com/users/UnleashedMind","html_url":"https://github.com/UnleashedMind","followers_url":"https://api.github.com/users/UnleashedMind/followers","following_url":"https://api.github.com/users/UnleashedMind/following{/other_user}","gists_url":"https://api.github.com/users/UnleashedMind/gists{/gist_id}","starred_url":"https://api.github.com/users/UnleashedMind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnleashedMind/subscriptions","organizations_url":"https://api.github.com/users/UnleashedMind/orgs","repos_url":"https://api.github.com/users/UnleashedMind/repos","events_url":"https://api.github.com/users/UnleashedMind/events{/privacy}","received_events_url":"https://api.github.com/users/UnleashedMind/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mlabieniec","id":1417045,"node_id":"MDQ6VXNlcjE0MTcwNDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1417045?v=4","gravatar_id":"","url":"https://api.github.com/users/mlabieniec","html_url":"https://github.com/mlabieniec","followers_url":"https://api.github.com/users/mlabieniec/followers","following_url":"https://api.github.com/users/mlabieniec/following{/other_user}","gists_url":"https://api.github.com/users/mlabieniec/gists{/gist_id}","starred_url":"https://api.github.com/users/mlabieniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlabieniec/subscriptions","organizations_url":"https://api.github.com/users/mlabieniec/orgs","repos_url":"https://api.github.com/users/mlabieniec/repos","events_url":"https://api.github.com/users/mlabieniec/events{/privacy}","received_events_url":"https://api.github.com/users/mlabieniec/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1053678748,"node_id":"MDU6TGFiZWwxMDUzNjc4NzQ4","url":"https://api.github.com/repos/aws-amplify/amplify-cli/labels/review","name":"review","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371/commits","review_comments_url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371/comments","review_comment_url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/371/comments","statuses_url":"https://api.github.com/repos/aws-amplify/amplify-cli/statuses/5ab2a95ec63588515516e1f088b7f75e11293081","head":{"label":"UnleashedMind:dev","ref":"dev","sha":"5ab2a95ec63588515516e1f088b7f75e11293081","user":{"login":"UnleashedMind","id":6025263,"node_id":"MDQ6VXNlcjYwMjUyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6025263?v=4","gravatar_id":"","url":"https://api.github.com/users/UnleashedMind","html_url":"https://github.com/UnleashedMind","followers_url":"https://api.github.com/users/UnleashedMind/followers","following_url":"https://api.github.com/users/UnleashedMind/following{/other_user}","gists_url":"https://api.github.com/users/UnleashedMind/gists{/gist_id}","starred_url":"https://api.github.com/users/UnleashedMind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnleashedMind/subscriptions","organizations_url":"https://api.github.com/users/UnleashedMind/orgs","repos_url":"https://api.github.com/users/UnleashedMind/repos","events_url":"https://api.github.com/users/UnleashedMind/events{/privacy}","received_events_url":"https://api.github.com/users/UnleashedMind/received_events","type":"User","site_admin":false},"repo":{"id":145895966,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4OTU5NjY=","name":"amplify-cli","full_name":"UnleashedMind/amplify-cli","private":false,"owner":{"login":"UnleashedMind","id":6025263,"node_id":"MDQ6VXNlcjYwMjUyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6025263?v=4","gravatar_id":"","url":"https://api.github.com/users/UnleashedMind","html_url":"https://github.com/UnleashedMind","followers_url":"https://api.github.com/users/UnleashedMind/followers","following_url":"https://api.github.com/users/UnleashedMind/following{/other_user}","gists_url":"https://api.github.com/users/UnleashedMind/gists{/gist_id}","starred_url":"https://api.github.com/users/UnleashedMind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnleashedMind/subscriptions","organizations_url":"https://api.github.com/users/UnleashedMind/orgs","repos_url":"https://api.github.com/users/UnleashedMind/repos","events_url":"https://api.github.com/users/UnleashedMind/events{/privacy}","received_events_url":"https://api.github.com/users/UnleashedMind/received_events","type":"User","site_admin":false},"html_url":"https://github.com/UnleashedMind/amplify-cli","description":"A CLI toolchain for simplifying serverless web and mobile development.","fork":true,"url":"https://api.github.com/repos/UnleashedMind/amplify-cli","forks_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/forks","keys_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/teams","hooks_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/hooks","issue_events_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/issues/events{/number}","events_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/events","assignees_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/assignees{/user}","branches_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/branches{/branch}","tags_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/tags","blobs_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/languages","stargazers_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/stargazers","contributors_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/contributors","subscribers_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/subscribers","subscription_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/subscription","commits_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/contents/{+path}","compare_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/merges","archive_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/downloads","issues_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/issues{/number}","pulls_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/labels{/name}","releases_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/releases{/id}","deployments_url":"https://api.github.com/repos/UnleashedMind/amplify-cli/deployments","created_at":"2018-08-23T19:05:56Z","updated_at":"2018-10-19T18:47:47Z","pushed_at":"2018-11-01T20:30:57Z","git_url":"git://github.com/UnleashedMind/amplify-cli.git","ssh_url":"git@github.com:UnleashedMind/amplify-cli.git","clone_url":"https://github.com/UnleashedMind/amplify-cli.git","svn_url":"https://github.com/UnleashedMind/amplify-cli","homepage":null,"size":28280,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"aws-amplify:multienv","ref":"multienv","sha":"cef119590ef39dbcdfc6da2ca54b90f125372a10","user":{"login":"aws-amplify","id":41077760,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDc3NzYw","avatar_url":"https://avatars0.githubusercontent.com/u/41077760?v=4","gravatar_id":"","url":"https://api.github.com/users/aws-amplify","html_url":"https://github.com/aws-amplify","followers_url":"https://api.github.com/users/aws-amplify/followers","following_url":"https://api.github.com/users/aws-amplify/following{/other_user}","gists_url":"https://api.github.com/users/aws-amplify/gists{/gist_id}","starred_url":"https://api.github.com/users/aws-amplify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws-amplify/subscriptions","organizations_url":"https://api.github.com/users/aws-amplify/orgs","repos_url":"https://api.github.com/users/aws-amplify/repos","events_url":"https://api.github.com/users/aws-amplify/events{/privacy}","received_events_url":"https://api.github.com/users/aws-amplify/received_events","type":"Organization","site_admin":false},"repo":{"id":145880460,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4ODA0NjA=","name":"amplify-cli","full_name":"aws-amplify/amplify-cli","private":false,"owner":{"login":"aws-amplify","id":41077760,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDc3NzYw","avatar_url":"https://avatars0.githubusercontent.com/u/41077760?v=4","gravatar_id":"","url":"https://api.github.com/users/aws-amplify","html_url":"https://github.com/aws-amplify","followers_url":"https://api.github.com/users/aws-amplify/followers","following_url":"https://api.github.com/users/aws-amplify/following{/other_user}","gists_url":"https://api.github.com/users/aws-amplify/gists{/gist_id}","starred_url":"https://api.github.com/users/aws-amplify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws-amplify/subscriptions","organizations_url":"https://api.github.com/users/aws-amplify/orgs","repos_url":"https://api.github.com/users/aws-amplify/repos","events_url":"https://api.github.com/users/aws-amplify/events{/privacy}","received_events_url":"https://api.github.com/users/aws-amplify/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aws-amplify/amplify-cli","description":"A CLI toolchain for simplifying serverless web and mobile development.","fork":false,"url":"https://api.github.com/repos/aws-amplify/amplify-cli","forks_url":"https://api.github.com/repos/aws-amplify/amplify-cli/forks","keys_url":"https://api.github.com/repos/aws-amplify/amplify-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws-amplify/amplify-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws-amplify/amplify-cli/teams","hooks_url":"https://api.github.com/repos/aws-amplify/amplify-cli/hooks","issue_events_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/events{/number}","events_url":"https://api.github.com/repos/aws-amplify/amplify-cli/events","assignees_url":"https://api.github.com/repos/aws-amplify/amplify-cli/assignees{/user}","branches_url":"https://api.github.com/repos/aws-amplify/amplify-cli/branches{/branch}","tags_url":"https://api.github.com/repos/aws-amplify/amplify-cli/tags","blobs_url":"https://api.github.com/repos/aws-amplify/amplify-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws-amplify/amplify-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws-amplify/amplify-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws-amplify/amplify-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws-amplify/amplify-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/aws-amplify/amplify-cli/languages","stargazers_url":"https://api.github.com/repos/aws-amplify/amplify-cli/stargazers","contributors_url":"https://api.github.com/repos/aws-amplify/amplify-cli/contributors","subscribers_url":"https://api.github.com/repos/aws-amplify/amplify-cli/subscribers","subscription_url":"https://api.github.com/repos/aws-amplify/amplify-cli/subscription","commits_url":"https://api.github.com/repos/aws-amplify/amplify-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws-amplify/amplify-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws-amplify/amplify-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws-amplify/amplify-cli/contents/{+path}","compare_url":"https://api.github.com/repos/aws-amplify/amplify-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws-amplify/amplify-cli/merges","archive_url":"https://api.github.com/repos/aws-amplify/amplify-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws-amplify/amplify-cli/downloads","issues_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues{/number}","pulls_url":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/aws-amplify/amplify-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/aws-amplify/amplify-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws-amplify/amplify-cli/labels{/name}","releases_url":"https://api.github.com/repos/aws-amplify/amplify-cli/releases{/id}","deployments_url":"https://api.github.com/repos/aws-amplify/amplify-cli/deployments","created_at":"2018-08-23T16:33:10Z","updated_at":"2018-11-01T16:49:37Z","pushed_at":"2018-11-01T20:30:59Z","git_url":"git://github.com/aws-amplify/amplify-cli.git","ssh_url":"git@github.com:aws-amplify/amplify-cli.git","clone_url":"https://github.com/aws-amplify/amplify-cli.git","svn_url":"https://github.com/aws-amplify/amplify-cli","homepage":null,"size":28385,"stargazers_count":373,"watchers_count":373,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":114,"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":54,"open_issues":114,"watchers":373,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371"},"html":{"href":"https://github.com/aws-amplify/amplify-cli/pull/371"},"issue":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/371"},"comments":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/371/comments"},"review_comments":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371/comments"},"review_comment":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/pulls/371/commits"},"statuses":{"href":"https://api.github.com/repos/aws-amplify/amplify-cli/statuses/5ab2a95ec63588515516e1f088b7f75e11293081"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"UnleashedMind"}}