{"action":"created","comment":{"url":"https://api.github.com/repos/LiskHQ/lisk/pulls/comments/189877958","pull_request_review_id":122139863,"id":189877958,"diff_hunk":"@@ -0,0 +1,131 @@\n+/*\n+ * LiskHQ/lisk-scripts/updateConfig.js\n+ * Copyright (C) 2017 Lisk Foundation\n+ *\n+ * See the LICENSE file at the top-level directory of this distribution\n+ * for licensing information.\n+ *\n+ * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,\n+ * no part of this software, including this file, may be copied, modified,\n+ * propagated, or distributed except according to the terms contained in the\n+ * LICENSE file.\n+ *\n+ * Removal or modification of this copyright notice is prohibited.\n+ */\n+\n+const fs = require('fs');\n+const readline = require('readline');\n+const program = require('commander');\n+const extend = require('extend');\n+const lisk = require('lisk-js');\n+\n+/* eslint-disable no-console */\n+\n+program\n+\t.version('0.1.1')\n+\t.option('-o, --old <path>', 'Old config.json')","path":"scripts/update_config.js","position":null,"original_position":26,"commit_id":"cfefbcb74aae0808704954a8dfe43cff14b1df55","original_commit_id":"da5e9ca45be9060a1ac71de8b40996a4da1b0897","user":{"login":"nazarhussain","id":112468,"avatar_url":"https://avatars0.githubusercontent.com/u/112468?v=4","gravatar_id":"","url":"https://api.github.com/users/nazarhussain","html_url":"https://github.com/nazarhussain","followers_url":"https://api.github.com/users/nazarhussain/followers","following_url":"https://api.github.com/users/nazarhussain/following{/other_user}","gists_url":"https://api.github.com/users/nazarhussain/gists{/gist_id}","starred_url":"https://api.github.com/users/nazarhussain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazarhussain/subscriptions","organizations_url":"https://api.github.com/users/nazarhussain/orgs","repos_url":"https://api.github.com/users/nazarhussain/repos","events_url":"https://api.github.com/users/nazarhussain/events{/privacy}","received_events_url":"https://api.github.com/users/nazarhussain/received_events","type":"User","site_admin":false},"body":"@willclarktech I don't find any other way to provide a required option in `commander` I ported the script from other repo, so most of boilerplate is the same. Do you know is there any option to specify required option in commander? \r\nhttps://www.npmjs.com/package/commander\r\n","created_at":"2018-05-22T12:16:27Z","updated_at":"2018-05-22T12:16:27Z","html_url":"https://github.com/LiskHQ/lisk/pull/2048#discussion_r189877958","pull_request_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/comments/189877958"},"html":{"href":"https://github.com/LiskHQ/lisk/pull/2048#discussion_r189877958"},"pull_request":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048"}},"in_reply_to_id":189876033},"pull_request":{"url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048","id":189628849,"html_url":"https://github.com/LiskHQ/lisk/pull/2048","diff_url":"https://github.com/LiskHQ/lisk/pull/2048.diff","patch_url":"https://github.com/LiskHQ/lisk/pull/2048.patch","issue_url":"https://api.github.com/repos/LiskHQ/lisk/issues/2048","number":2048,"state":"open","locked":false,"title":"Add config.json migration script from from old version 0.9.x - Closes #2046","user":{"login":"nazarhussain","id":112468,"avatar_url":"https://avatars0.githubusercontent.com/u/112468?v=4","gravatar_id":"","url":"https://api.github.com/users/nazarhussain","html_url":"https://github.com/nazarhussain","followers_url":"https://api.github.com/users/nazarhussain/followers","following_url":"https://api.github.com/users/nazarhussain/following{/other_user}","gists_url":"https://api.github.com/users/nazarhussain/gists{/gist_id}","starred_url":"https://api.github.com/users/nazarhussain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazarhussain/subscriptions","organizations_url":"https://api.github.com/users/nazarhussain/orgs","repos_url":"https://api.github.com/users/nazarhussain/repos","events_url":"https://api.github.com/users/nazarhussain/events{/privacy}","received_events_url":"https://api.github.com/users/nazarhussain/received_events","type":"User","site_admin":false},"body":"### What was the problem?\r\nConfig migration script is in lisk-scripts repo and not updated.\r\n\r\n### How did I fix it?\r\nCreated a script inside core to migrate the config.json file from 0.9.x version to current version\r\n\r\n### How to test it?\r\nRun the script and match the config file from mater and 1.0.0 branch. \r\n\r\n### Review checklist\r\n\r\n* The PR solves #2046\r\n* All new code is covered with unit tests\r\n* All new code was formatted with Prettier\r\n* Linting passes\r\n* Tests pass\r\n* Commit messages follow the [commit guidelines](CONTRIBUTING.md#git-commit-messages)\r\n* Documentation has been added/updated\r\n","created_at":"2018-05-22T11:21:09Z","updated_at":"2018-05-22T12:16:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"566c3d8930b6d9483600aa7510a5bbbb4aa4eae4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":377190445,"url":"https://api.github.com/repos/LiskHQ/lisk/labels/:building_construction:%20in%20progress","name":":building_construction: in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048/commits","review_comments_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048/comments","review_comment_url":"https://api.github.com/repos/LiskHQ/lisk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LiskHQ/lisk/issues/2048/comments","statuses_url":"https://api.github.com/repos/LiskHQ/lisk/statuses/cfefbcb74aae0808704954a8dfe43cff14b1df55","head":{"label":"LiskHQ:2046-update-config","ref":"2046-update-config","sha":"cfefbcb74aae0808704954a8dfe43cff14b1df55","user":{"login":"LiskHQ","id":16600915,"avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":50873641,"name":"lisk","full_name":"LiskHQ/lisk","owner":{"login":"LiskHQ","id":16600915,"avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LiskHQ/lisk","description":"📟 Lisk blockchain application platform","fork":false,"url":"https://api.github.com/repos/LiskHQ/lisk","forks_url":"https://api.github.com/repos/LiskHQ/lisk/forks","keys_url":"https://api.github.com/repos/LiskHQ/lisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LiskHQ/lisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LiskHQ/lisk/teams","hooks_url":"https://api.github.com/repos/LiskHQ/lisk/hooks","issue_events_url":"https://api.github.com/repos/LiskHQ/lisk/issues/events{/number}","events_url":"https://api.github.com/repos/LiskHQ/lisk/events","assignees_url":"https://api.github.com/repos/LiskHQ/lisk/assignees{/user}","branches_url":"https://api.github.com/repos/LiskHQ/lisk/branches{/branch}","tags_url":"https://api.github.com/repos/LiskHQ/lisk/tags","blobs_url":"https://api.github.com/repos/LiskHQ/lisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LiskHQ/lisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LiskHQ/lisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/LiskHQ/lisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LiskHQ/lisk/statuses/{sha}","languages_url":"https://api.github.com/repos/LiskHQ/lisk/languages","stargazers_url":"https://api.github.com/repos/LiskHQ/lisk/stargazers","contributors_url":"https://api.github.com/repos/LiskHQ/lisk/contributors","subscribers_url":"https://api.github.com/repos/LiskHQ/lisk/subscribers","subscription_url":"https://api.github.com/repos/LiskHQ/lisk/subscription","commits_url":"https://api.github.com/repos/LiskHQ/lisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/LiskHQ/lisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/LiskHQ/lisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/LiskHQ/lisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/LiskHQ/lisk/contents/{+path}","compare_url":"https://api.github.com/repos/LiskHQ/lisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LiskHQ/lisk/merges","archive_url":"https://api.github.com/repos/LiskHQ/lisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LiskHQ/lisk/downloads","issues_url":"https://api.github.com/repos/LiskHQ/lisk/issues{/number}","pulls_url":"https://api.github.com/repos/LiskHQ/lisk/pulls{/number}","milestones_url":"https://api.github.com/repos/LiskHQ/lisk/milestones{/number}","notifications_url":"https://api.github.com/repos/LiskHQ/lisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LiskHQ/lisk/labels{/name}","releases_url":"https://api.github.com/repos/LiskHQ/lisk/releases{/id}","deployments_url":"https://api.github.com/repos/LiskHQ/lisk/deployments","created_at":"2016-02-01T21:45:35Z","updated_at":"2018-05-22T10:26:27Z","pushed_at":"2018-05-22T12:14:26Z","git_url":"git://github.com/LiskHQ/lisk.git","ssh_url":"git@github.com:LiskHQ/lisk.git","clone_url":"https://github.com/LiskHQ/lisk.git","svn_url":"https://github.com/LiskHQ/lisk","homepage":"https://lisk.io/","size":18369,"stargazers_count":2330,"watchers_count":2330,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":354,"mirror_url":null,"archived":false,"open_issues_count":117,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":354,"open_issues":117,"watchers":2330,"default_branch":"development"}},"base":{"label":"LiskHQ:1.0.0-beta.8","ref":"1.0.0-beta.8","sha":"fbaf59898b26a1647c058b30e204c5ccb5a90950","user":{"login":"LiskHQ","id":16600915,"avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":50873641,"name":"lisk","full_name":"LiskHQ/lisk","owner":{"login":"LiskHQ","id":16600915,"avatar_url":"https://avatars1.githubusercontent.com/u/16600915?v=4","gravatar_id":"","url":"https://api.github.com/users/LiskHQ","html_url":"https://github.com/LiskHQ","followers_url":"https://api.github.com/users/LiskHQ/followers","following_url":"https://api.github.com/users/LiskHQ/following{/other_user}","gists_url":"https://api.github.com/users/LiskHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LiskHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiskHQ/subscriptions","organizations_url":"https://api.github.com/users/LiskHQ/orgs","repos_url":"https://api.github.com/users/LiskHQ/repos","events_url":"https://api.github.com/users/LiskHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LiskHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LiskHQ/lisk","description":"📟 Lisk blockchain application platform","fork":false,"url":"https://api.github.com/repos/LiskHQ/lisk","forks_url":"https://api.github.com/repos/LiskHQ/lisk/forks","keys_url":"https://api.github.com/repos/LiskHQ/lisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LiskHQ/lisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LiskHQ/lisk/teams","hooks_url":"https://api.github.com/repos/LiskHQ/lisk/hooks","issue_events_url":"https://api.github.com/repos/LiskHQ/lisk/issues/events{/number}","events_url":"https://api.github.com/repos/LiskHQ/lisk/events","assignees_url":"https://api.github.com/repos/LiskHQ/lisk/assignees{/user}","branches_url":"https://api.github.com/repos/LiskHQ/lisk/branches{/branch}","tags_url":"https://api.github.com/repos/LiskHQ/lisk/tags","blobs_url":"https://api.github.com/repos/LiskHQ/lisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LiskHQ/lisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LiskHQ/lisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/LiskHQ/lisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LiskHQ/lisk/statuses/{sha}","languages_url":"https://api.github.com/repos/LiskHQ/lisk/languages","stargazers_url":"https://api.github.com/repos/LiskHQ/lisk/stargazers","contributors_url":"https://api.github.com/repos/LiskHQ/lisk/contributors","subscribers_url":"https://api.github.com/repos/LiskHQ/lisk/subscribers","subscription_url":"https://api.github.com/repos/LiskHQ/lisk/subscription","commits_url":"https://api.github.com/repos/LiskHQ/lisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/LiskHQ/lisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/LiskHQ/lisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/LiskHQ/lisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/LiskHQ/lisk/contents/{+path}","compare_url":"https://api.github.com/repos/LiskHQ/lisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LiskHQ/lisk/merges","archive_url":"https://api.github.com/repos/LiskHQ/lisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LiskHQ/lisk/downloads","issues_url":"https://api.github.com/repos/LiskHQ/lisk/issues{/number}","pulls_url":"https://api.github.com/repos/LiskHQ/lisk/pulls{/number}","milestones_url":"https://api.github.com/repos/LiskHQ/lisk/milestones{/number}","notifications_url":"https://api.github.com/repos/LiskHQ/lisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LiskHQ/lisk/labels{/name}","releases_url":"https://api.github.com/repos/LiskHQ/lisk/releases{/id}","deployments_url":"https://api.github.com/repos/LiskHQ/lisk/deployments","created_at":"2016-02-01T21:45:35Z","updated_at":"2018-05-22T10:26:27Z","pushed_at":"2018-05-22T12:14:26Z","git_url":"git://github.com/LiskHQ/lisk.git","ssh_url":"git@github.com:LiskHQ/lisk.git","clone_url":"https://github.com/LiskHQ/lisk.git","svn_url":"https://github.com/LiskHQ/lisk","homepage":"https://lisk.io/","size":18369,"stargazers_count":2330,"watchers_count":2330,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":354,"mirror_url":null,"archived":false,"open_issues_count":117,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":354,"open_issues":117,"watchers":2330,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048"},"html":{"href":"https://github.com/LiskHQ/lisk/pull/2048"},"issue":{"href":"https://api.github.com/repos/LiskHQ/lisk/issues/2048"},"comments":{"href":"https://api.github.com/repos/LiskHQ/lisk/issues/2048/comments"},"review_comments":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048/comments"},"review_comment":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LiskHQ/lisk/pulls/2048/commits"},"statuses":{"href":"https://api.github.com/repos/LiskHQ/lisk/statuses/cfefbcb74aae0808704954a8dfe43cff14b1df55"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nazarhussain"}}