{"action":"created","comment":{"url":"https://api.github.com/repos/postmanlabs/newman/pulls/comments/201968915","pull_request_review_id":136570820,"id":201968915,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTk2ODkxNQ==","diff_hunk":"@@ -23,391 +26,142 @@ var _ = require('lodash'),\n     },\n \n     /**\n-     * Separates reporter specific arguments from the rest.\n-     *\n-     * @param {Array} allArgs - An array of strings, each coresponding to a CLI argument.\n-     * @returns {Object} - An object with reporter and regular argument key-values.\n-     */\n-    separateReporterArgs = function (allArgs) {\n-        var reporterArgs = [],\n-            args = [],\n-            arg,\n-            index,\n-            i;\n-\n-        // Separate the reporter arguments from the rest\n-        for (i = 0; i < allArgs.length; i++) {\n-            arg = allArgs[i];\n-\n-            if (!_.startsWith(arg, '--reporter-')) {\n-                args.push(arg);\n-                continue;\n-            }\n-\n-            index = arg.indexOf('=');\n-\n-            if (index !== -1) {\n-                // Split the attribute if its like key=value\n-                reporterArgs.push(arg.slice(0, index), arg.slice(index + 1));\n-            }\n-            else if (allArgs[i + 1] && !_.startsWith(allArgs[i + 1], '-')) {\n-                // Also push the next parameter if it's not an option.\n-                reporterArgs.push(arg, allArgs[++i]);\n-            }\n-            else {\n-                reporterArgs.push(arg);\n-            }\n-        }\n-\n-        return {\n-            reporter: reporterArgs,\n-            argv: args\n-        };\n-    },\n-\n-    /**\n-     *  used for collecting global key=value variables supplied through command line\n+     *  Commander coercion for collecting global key=value variables\n      *\n      * --global-var \"foo=bar\" --global-var \"alpha=beta\"\n      *\n      * @param {String} val - The argument provided to `--global-var`.\n      * @param {Array} memo - The array that is populated by key value pairs.\n      * @returns {Array} - [{key, value}] - The object representation of the current CLI variable.\n-    */\n-    collect = function (val, memo) {\n-        var arg,\n+     */\n+    memoize = (val, memo) => {\n+        let arg,\n             eqIndex = val.indexOf('='),\n             hasEq = eqIndex !== -1;\n \n         // This is done instead of splitting by `=` to avoid chopping off `=` that could be present in the value\n-        arg = hasEq ? { key: val.slice(0, eqIndex), value: val.slice(eqIndex + 1) } :\n-            { key: val, value: undefined };\n+        arg = hasEq ? {","path":"bin/newman.js","position":96,"original_position":96,"commit_id":"ef3638bfd2b8a4d7997588bbe50d4d60cf02bcc4","original_commit_id":"ef3638bfd2b8a4d7997588bbe50d4d60cf02bcc4","user":{"login":"kunagpal","id":7289840,"node_id":"MDQ6VXNlcjcyODk4NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/7289840?v=4","gravatar_id":"","url":"https://api.github.com/users/kunagpal","html_url":"https://github.com/kunagpal","followers_url":"https://api.github.com/users/kunagpal/followers","following_url":"https://api.github.com/users/kunagpal/following{/other_user}","gists_url":"https://api.github.com/users/kunagpal/gists{/gist_id}","starred_url":"https://api.github.com/users/kunagpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunagpal/subscriptions","organizations_url":"https://api.github.com/users/kunagpal/orgs","repos_url":"https://api.github.com/users/kunagpal/repos","events_url":"https://api.github.com/users/kunagpal/events{/privacy}","received_events_url":"https://api.github.com/users/kunagpal/received_events","type":"User","site_admin":false},"body":"`hasEq` can be replaced with `eqIndex === -1` directly.","created_at":"2018-07-12T09:29:51Z","updated_at":"2018-07-12T09:49:58Z","html_url":"https://github.com/postmanlabs/newman/pull/1623#discussion_r201968915","pull_request_url":"https://api.github.com/repos/postmanlabs/newman/pulls/1623","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/comments/201968915"},"html":{"href":"https://github.com/postmanlabs/newman/pull/1623#discussion_r201968915"},"pull_request":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/1623"}}},"pull_request":{"url":"https://api.github.com/repos/postmanlabs/newman/pulls/1623","id":200664332,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNjY0MzMy","html_url":"https://github.com/postmanlabs/newman/pull/1623","diff_url":"https://github.com/postmanlabs/newman/pull/1623.diff","patch_url":"https://github.com/postmanlabs/newman/pull/1623.patch","issue_url":"https://api.github.com/repos/postmanlabs/newman/issues/1623","number":1623,"state":"open","locked":false,"title":"Refactor Newman CLI","user":{"login":"codenirvana","id":4865836,"node_id":"MDQ6VXNlcjQ4NjU4MzY=","avatar_url":"https://avatars2.githubusercontent.com/u/4865836?v=4","gravatar_id":"","url":"https://api.github.com/users/codenirvana","html_url":"https://github.com/codenirvana","followers_url":"https://api.github.com/users/codenirvana/followers","following_url":"https://api.github.com/users/codenirvana/following{/other_user}","gists_url":"https://api.github.com/users/codenirvana/gists{/gist_id}","starred_url":"https://api.github.com/users/codenirvana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenirvana/subscriptions","organizations_url":"https://api.github.com/users/codenirvana/orgs","repos_url":"https://api.github.com/users/codenirvana/repos","events_url":"https://api.github.com/users/codenirvana/events{/privacy}","received_events_url":"https://api.github.com/users/codenirvana/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-11T11:08:45Z","updated_at":"2018-07-12T09:49:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71dce6ed0424f0c75b1fab2689461a233cec6663","assignee":null,"assignees":[],"requested_reviewers":[{"login":"shamasis","id":232373,"node_id":"MDQ6VXNlcjIzMjM3Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/232373?v=4","gravatar_id":"","url":"https://api.github.com/users/shamasis","html_url":"https://github.com/shamasis","followers_url":"https://api.github.com/users/shamasis/followers","following_url":"https://api.github.com/users/shamasis/following{/other_user}","gists_url":"https://api.github.com/users/shamasis/gists{/gist_id}","starred_url":"https://api.github.com/users/shamasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamasis/subscriptions","organizations_url":"https://api.github.com/users/shamasis/orgs","repos_url":"https://api.github.com/users/shamasis/repos","events_url":"https://api.github.com/users/shamasis/events{/privacy}","received_events_url":"https://api.github.com/users/shamasis/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/postmanlabs/newman/pulls/1623/commits","review_comments_url":"https://api.github.com/repos/postmanlabs/newman/pulls/1623/comments","review_comment_url":"https://api.github.com/repos/postmanlabs/newman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/postmanlabs/newman/issues/1623/comments","statuses_url":"https://api.github.com/repos/postmanlabs/newman/statuses/ef3638bfd2b8a4d7997588bbe50d4d60cf02bcc4","head":{"label":"postmanlabs:feature/cli","ref":"feature/cli","sha":"ef3638bfd2b8a4d7997588bbe50d4d60cf02bcc4","user":{"login":"postmanlabs","id":10251060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjUxMDYw","avatar_url":"https://avatars2.githubusercontent.com/u/10251060?v=4","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17449493,"node_id":"MDEwOlJlcG9zaXRvcnkxNzQ0OTQ5Mw==","name":"newman","full_name":"postmanlabs/newman","owner":{"login":"postmanlabs","id":10251060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjUxMDYw","avatar_url":"https://avatars2.githubusercontent.com/u/10251060?v=4","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/postmanlabs/newman","description":"Newman is a command-line collection runner for Postman","fork":false,"url":"https://api.github.com/repos/postmanlabs/newman","forks_url":"https://api.github.com/repos/postmanlabs/newman/forks","keys_url":"https://api.github.com/repos/postmanlabs/newman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postmanlabs/newman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postmanlabs/newman/teams","hooks_url":"https://api.github.com/repos/postmanlabs/newman/hooks","issue_events_url":"https://api.github.com/repos/postmanlabs/newman/issues/events{/number}","events_url":"https://api.github.com/repos/postmanlabs/newman/events","assignees_url":"https://api.github.com/repos/postmanlabs/newman/assignees{/user}","branches_url":"https://api.github.com/repos/postmanlabs/newman/branches{/branch}","tags_url":"https://api.github.com/repos/postmanlabs/newman/tags","blobs_url":"https://api.github.com/repos/postmanlabs/newman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postmanlabs/newman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postmanlabs/newman/git/refs{/sha}","trees_url":"https://api.github.com/repos/postmanlabs/newman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postmanlabs/newman/statuses/{sha}","languages_url":"https://api.github.com/repos/postmanlabs/newman/languages","stargazers_url":"https://api.github.com/repos/postmanlabs/newman/stargazers","contributors_url":"https://api.github.com/repos/postmanlabs/newman/contributors","subscribers_url":"https://api.github.com/repos/postmanlabs/newman/subscribers","subscription_url":"https://api.github.com/repos/postmanlabs/newman/subscription","commits_url":"https://api.github.com/repos/postmanlabs/newman/commits{/sha}","git_commits_url":"https://api.github.com/repos/postmanlabs/newman/git/commits{/sha}","comments_url":"https://api.github.com/repos/postmanlabs/newman/comments{/number}","issue_comment_url":"https://api.github.com/repos/postmanlabs/newman/issues/comments{/number}","contents_url":"https://api.github.com/repos/postmanlabs/newman/contents/{+path}","compare_url":"https://api.github.com/repos/postmanlabs/newman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postmanlabs/newman/merges","archive_url":"https://api.github.com/repos/postmanlabs/newman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postmanlabs/newman/downloads","issues_url":"https://api.github.com/repos/postmanlabs/newman/issues{/number}","pulls_url":"https://api.github.com/repos/postmanlabs/newman/pulls{/number}","milestones_url":"https://api.github.com/repos/postmanlabs/newman/milestones{/number}","notifications_url":"https://api.github.com/repos/postmanlabs/newman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postmanlabs/newman/labels{/name}","releases_url":"https://api.github.com/repos/postmanlabs/newman/releases{/id}","deployments_url":"https://api.github.com/repos/postmanlabs/newman/deployments","created_at":"2014-03-05T17:52:17Z","updated_at":"2018-07-12T06:41:37Z","pushed_at":"2018-07-12T08:27:36Z","git_url":"git://github.com/postmanlabs/newman.git","ssh_url":"git@github.com:postmanlabs/newman.git","clone_url":"https://github.com/postmanlabs/newman.git","svn_url":"https://github.com/postmanlabs/newman","homepage":"http://www.getpostman.com","size":2689,"stargazers_count":2799,"watchers_count":2799,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":413,"mirror_url":null,"archived":false,"open_issues_count":40,"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":413,"open_issues":40,"watchers":2799,"default_branch":"develop"}},"base":{"label":"postmanlabs:feature/v4","ref":"feature/v4","sha":"4315b72d4fe216528add189131389ba8b40da63d","user":{"login":"postmanlabs","id":10251060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjUxMDYw","avatar_url":"https://avatars2.githubusercontent.com/u/10251060?v=4","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17449493,"node_id":"MDEwOlJlcG9zaXRvcnkxNzQ0OTQ5Mw==","name":"newman","full_name":"postmanlabs/newman","owner":{"login":"postmanlabs","id":10251060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjUxMDYw","avatar_url":"https://avatars2.githubusercontent.com/u/10251060?v=4","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/postmanlabs/newman","description":"Newman is a command-line collection runner for Postman","fork":false,"url":"https://api.github.com/repos/postmanlabs/newman","forks_url":"https://api.github.com/repos/postmanlabs/newman/forks","keys_url":"https://api.github.com/repos/postmanlabs/newman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postmanlabs/newman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postmanlabs/newman/teams","hooks_url":"https://api.github.com/repos/postmanlabs/newman/hooks","issue_events_url":"https://api.github.com/repos/postmanlabs/newman/issues/events{/number}","events_url":"https://api.github.com/repos/postmanlabs/newman/events","assignees_url":"https://api.github.com/repos/postmanlabs/newman/assignees{/user}","branches_url":"https://api.github.com/repos/postmanlabs/newman/branches{/branch}","tags_url":"https://api.github.com/repos/postmanlabs/newman/tags","blobs_url":"https://api.github.com/repos/postmanlabs/newman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postmanlabs/newman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postmanlabs/newman/git/refs{/sha}","trees_url":"https://api.github.com/repos/postmanlabs/newman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postmanlabs/newman/statuses/{sha}","languages_url":"https://api.github.com/repos/postmanlabs/newman/languages","stargazers_url":"https://api.github.com/repos/postmanlabs/newman/stargazers","contributors_url":"https://api.github.com/repos/postmanlabs/newman/contributors","subscribers_url":"https://api.github.com/repos/postmanlabs/newman/subscribers","subscription_url":"https://api.github.com/repos/postmanlabs/newman/subscription","commits_url":"https://api.github.com/repos/postmanlabs/newman/commits{/sha}","git_commits_url":"https://api.github.com/repos/postmanlabs/newman/git/commits{/sha}","comments_url":"https://api.github.com/repos/postmanlabs/newman/comments{/number}","issue_comment_url":"https://api.github.com/repos/postmanlabs/newman/issues/comments{/number}","contents_url":"https://api.github.com/repos/postmanlabs/newman/contents/{+path}","compare_url":"https://api.github.com/repos/postmanlabs/newman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postmanlabs/newman/merges","archive_url":"https://api.github.com/repos/postmanlabs/newman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postmanlabs/newman/downloads","issues_url":"https://api.github.com/repos/postmanlabs/newman/issues{/number}","pulls_url":"https://api.github.com/repos/postmanlabs/newman/pulls{/number}","milestones_url":"https://api.github.com/repos/postmanlabs/newman/milestones{/number}","notifications_url":"https://api.github.com/repos/postmanlabs/newman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postmanlabs/newman/labels{/name}","releases_url":"https://api.github.com/repos/postmanlabs/newman/releases{/id}","deployments_url":"https://api.github.com/repos/postmanlabs/newman/deployments","created_at":"2014-03-05T17:52:17Z","updated_at":"2018-07-12T06:41:37Z","pushed_at":"2018-07-12T08:27:36Z","git_url":"git://github.com/postmanlabs/newman.git","ssh_url":"git@github.com:postmanlabs/newman.git","clone_url":"https://github.com/postmanlabs/newman.git","svn_url":"https://github.com/postmanlabs/newman","homepage":"http://www.getpostman.com","size":2689,"stargazers_count":2799,"watchers_count":2799,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":413,"mirror_url":null,"archived":false,"open_issues_count":40,"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":413,"open_issues":40,"watchers":2799,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/1623"},"html":{"href":"https://github.com/postmanlabs/newman/pull/1623"},"issue":{"href":"https://api.github.com/repos/postmanlabs/newman/issues/1623"},"comments":{"href":"https://api.github.com/repos/postmanlabs/newman/issues/1623/comments"},"review_comments":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/1623/comments"},"review_comment":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/1623/commits"},"statuses":{"href":"https://api.github.com/repos/postmanlabs/newman/statuses/ef3638bfd2b8a4d7997588bbe50d4d60cf02bcc4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kunagpal"}}