{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/xo-init/pulls/comments/87457707","pull_request_review_id":8070780,"id":87457707,"diff_hunk":"@@ -74,7 +76,7 @@ module.exports = opts => {\n \t\t}\n \t});\n \n-\tif (Object.keys(cli).length) {\n+\tif (Object.keys(cli).length >= 0) {","path":"index.js","position":14,"original_position":14,"commit_id":"acfdc22072d6f4c5a5e7b191e84ce7df3fe53ed2","original_commit_id":"acfdc22072d6f4c5a5e7b191e84ce7df3fe53ed2","user":{"login":"Haroenv","id":6270048,"avatar_url":"https://avatars.githubusercontent.com/u/6270048?v=3","gravatar_id":"","url":"https://api.github.com/users/Haroenv","html_url":"https://github.com/Haroenv","followers_url":"https://api.github.com/users/Haroenv/followers","following_url":"https://api.github.com/users/Haroenv/following{/other_user}","gists_url":"https://api.github.com/users/Haroenv/gists{/gist_id}","starred_url":"https://api.github.com/users/Haroenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haroenv/subscriptions","organizations_url":"https://api.github.com/users/Haroenv/orgs","repos_url":"https://api.github.com/users/Haroenv/repos","events_url":"https://api.github.com/users/Haroenv/events{/privacy}","received_events_url":"https://api.github.com/users/Haroenv/received_events","type":"User","site_admin":false},"body":"That's right, I must've been confused 🎊 ","created_at":"2016-11-10T18:38:21Z","updated_at":"2016-11-10T18:38:21Z","html_url":"https://github.com/sindresorhus/xo-init/pull/11#discussion_r87457707","pull_request_url":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/xo-init/pulls/comments/87457707"},"html":{"href":"https://github.com/sindresorhus/xo-init/pull/11#discussion_r87457707"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11","id":93119803,"html_url":"https://github.com/sindresorhus/xo-init/pull/11","diff_url":"https://github.com/sindresorhus/xo-init/pull/11.diff","patch_url":"https://github.com/sindresorhus/xo-init/pull/11.patch","issue_url":"https://api.github.com/repos/sindresorhus/xo-init/issues/11","number":11,"state":"open","locked":false,"title":"Add check if user has yarn.lock in cwd","user":{"login":"Haroenv","id":6270048,"avatar_url":"https://avatars.githubusercontent.com/u/6270048?v=3","gravatar_id":"","url":"https://api.github.com/users/Haroenv","html_url":"https://github.com/Haroenv","followers_url":"https://api.github.com/users/Haroenv/followers","following_url":"https://api.github.com/users/Haroenv/following{/other_user}","gists_url":"https://api.github.com/users/Haroenv/gists{/gist_id}","starred_url":"https://api.github.com/users/Haroenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haroenv/subscriptions","organizations_url":"https://api.github.com/users/Haroenv/orgs","repos_url":"https://api.github.com/users/Haroenv/repos","events_url":"https://api.github.com/users/Haroenv/events{/privacy}","received_events_url":"https://api.github.com/users/Haroenv/received_events","type":"User","site_admin":false},"body":"There's a bit repetition, should I maybe declare the `execa('npm', ['install', '--save-dev', 'xo'], {cwd: pkgCwd})` or `'npm', ['install', '--save-dev', 'xo']` as a variable and then use `...command`? I wasn't sure what was the best option.\r\n\r\n```js\r\nlet command = {'npm', ['install', '--save-dev', 'xo']};\r\nif (hasYarn(pkgCwd)) {\r\n\tcommand = {'yarn', ['add', '--dev', 'xo']};\r\n}\r\nreturn opts.skipInstall ? Promise.resolve(post) : execa(...command, {cwd: pkgCwd}).then(post);\r\n```\r\n\r\nThat would look like this I think\r\n\r\ncloses #10\r\n\r\n# Todo\r\n\r\n- [ ] add test\r\n- [ ] pass linting","created_at":"2016-11-10T10:03:19Z","updated_at":"2016-11-10T18:38:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38cda78ec3045768a28b7442e32a941487003056","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/xo-init/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/xo-init/issues/11/comments","statuses_url":"https://api.github.com/repos/sindresorhus/xo-init/statuses/acfdc22072d6f4c5a5e7b191e84ce7df3fe53ed2","head":{"label":"Haroenv:patch-1","ref":"patch-1","sha":"acfdc22072d6f4c5a5e7b191e84ce7df3fe53ed2","user":{"login":"Haroenv","id":6270048,"avatar_url":"https://avatars.githubusercontent.com/u/6270048?v=3","gravatar_id":"","url":"https://api.github.com/users/Haroenv","html_url":"https://github.com/Haroenv","followers_url":"https://api.github.com/users/Haroenv/followers","following_url":"https://api.github.com/users/Haroenv/following{/other_user}","gists_url":"https://api.github.com/users/Haroenv/gists{/gist_id}","starred_url":"https://api.github.com/users/Haroenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haroenv/subscriptions","organizations_url":"https://api.github.com/users/Haroenv/orgs","repos_url":"https://api.github.com/users/Haroenv/repos","events_url":"https://api.github.com/users/Haroenv/events{/privacy}","received_events_url":"https://api.github.com/users/Haroenv/received_events","type":"User","site_admin":false},"repo":{"id":73368906,"name":"xo-init","full_name":"Haroenv/xo-init","owner":{"login":"Haroenv","id":6270048,"avatar_url":"https://avatars.githubusercontent.com/u/6270048?v=3","gravatar_id":"","url":"https://api.github.com/users/Haroenv","html_url":"https://github.com/Haroenv","followers_url":"https://api.github.com/users/Haroenv/followers","following_url":"https://api.github.com/users/Haroenv/following{/other_user}","gists_url":"https://api.github.com/users/Haroenv/gists{/gist_id}","starred_url":"https://api.github.com/users/Haroenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haroenv/subscriptions","organizations_url":"https://api.github.com/users/Haroenv/orgs","repos_url":"https://api.github.com/users/Haroenv/repos","events_url":"https://api.github.com/users/Haroenv/events{/privacy}","received_events_url":"https://api.github.com/users/Haroenv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Haroenv/xo-init","description":"Add XO to your project","fork":true,"url":"https://api.github.com/repos/Haroenv/xo-init","forks_url":"https://api.github.com/repos/Haroenv/xo-init/forks","keys_url":"https://api.github.com/repos/Haroenv/xo-init/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Haroenv/xo-init/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Haroenv/xo-init/teams","hooks_url":"https://api.github.com/repos/Haroenv/xo-init/hooks","issue_events_url":"https://api.github.com/repos/Haroenv/xo-init/issues/events{/number}","events_url":"https://api.github.com/repos/Haroenv/xo-init/events","assignees_url":"https://api.github.com/repos/Haroenv/xo-init/assignees{/user}","branches_url":"https://api.github.com/repos/Haroenv/xo-init/branches{/branch}","tags_url":"https://api.github.com/repos/Haroenv/xo-init/tags","blobs_url":"https://api.github.com/repos/Haroenv/xo-init/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Haroenv/xo-init/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Haroenv/xo-init/git/refs{/sha}","trees_url":"https://api.github.com/repos/Haroenv/xo-init/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Haroenv/xo-init/statuses/{sha}","languages_url":"https://api.github.com/repos/Haroenv/xo-init/languages","stargazers_url":"https://api.github.com/repos/Haroenv/xo-init/stargazers","contributors_url":"https://api.github.com/repos/Haroenv/xo-init/contributors","subscribers_url":"https://api.github.com/repos/Haroenv/xo-init/subscribers","subscription_url":"https://api.github.com/repos/Haroenv/xo-init/subscription","commits_url":"https://api.github.com/repos/Haroenv/xo-init/commits{/sha}","git_commits_url":"https://api.github.com/repos/Haroenv/xo-init/git/commits{/sha}","comments_url":"https://api.github.com/repos/Haroenv/xo-init/comments{/number}","issue_comment_url":"https://api.github.com/repos/Haroenv/xo-init/issues/comments{/number}","contents_url":"https://api.github.com/repos/Haroenv/xo-init/contents/{+path}","compare_url":"https://api.github.com/repos/Haroenv/xo-init/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Haroenv/xo-init/merges","archive_url":"https://api.github.com/repos/Haroenv/xo-init/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Haroenv/xo-init/downloads","issues_url":"https://api.github.com/repos/Haroenv/xo-init/issues{/number}","pulls_url":"https://api.github.com/repos/Haroenv/xo-init/pulls{/number}","milestones_url":"https://api.github.com/repos/Haroenv/xo-init/milestones{/number}","notifications_url":"https://api.github.com/repos/Haroenv/xo-init/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Haroenv/xo-init/labels{/name}","releases_url":"https://api.github.com/repos/Haroenv/xo-init/releases{/id}","deployments_url":"https://api.github.com/repos/Haroenv/xo-init/deployments","created_at":"2016-11-10T09:56:12Z","updated_at":"2016-11-10T09:56:13Z","pushed_at":"2016-11-10T18:33:16Z","git_url":"git://github.com/Haroenv/xo-init.git","ssh_url":"git@github.com:Haroenv/xo-init.git","clone_url":"https://github.com/Haroenv/xo-init.git","svn_url":"https://github.com/Haroenv/xo-init","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"sindresorhus:master","ref":"master","sha":"0d9e72af50cb94db32c791633d3902b6604bdc61","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":40053260,"name":"xo-init","full_name":"sindresorhus/xo-init","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/xo-init","description":"Add XO to your project","fork":false,"url":"https://api.github.com/repos/sindresorhus/xo-init","forks_url":"https://api.github.com/repos/sindresorhus/xo-init/forks","keys_url":"https://api.github.com/repos/sindresorhus/xo-init/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/xo-init/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/xo-init/teams","hooks_url":"https://api.github.com/repos/sindresorhus/xo-init/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/xo-init/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/xo-init/events","assignees_url":"https://api.github.com/repos/sindresorhus/xo-init/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/xo-init/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/xo-init/tags","blobs_url":"https://api.github.com/repos/sindresorhus/xo-init/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/xo-init/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/xo-init/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/xo-init/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/xo-init/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/xo-init/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/xo-init/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/xo-init/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/xo-init/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/xo-init/subscription","commits_url":"https://api.github.com/repos/sindresorhus/xo-init/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/xo-init/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/xo-init/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/xo-init/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/xo-init/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/xo-init/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/xo-init/merges","archive_url":"https://api.github.com/repos/sindresorhus/xo-init/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/xo-init/downloads","issues_url":"https://api.github.com/repos/sindresorhus/xo-init/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/xo-init/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/xo-init/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/xo-init/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/xo-init/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/xo-init/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/xo-init/deployments","created_at":"2015-08-01T16:46:22Z","updated_at":"2016-07-06T21:57:59Z","pushed_at":"2016-11-10T18:33:16Z","git_url":"git://github.com/sindresorhus/xo-init.git","ssh_url":"git@github.com:sindresorhus/xo-init.git","clone_url":"https://github.com/sindresorhus/xo-init.git","svn_url":"https://github.com/sindresorhus/xo-init","homepage":null,"size":28,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11"},"html":{"href":"https://github.com/sindresorhus/xo-init/pull/11"},"issue":{"href":"https://api.github.com/repos/sindresorhus/xo-init/issues/11"},"comments":{"href":"https://api.github.com/repos/sindresorhus/xo-init/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/xo-init/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/xo-init/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/xo-init/statuses/acfdc22072d6f4c5a5e7b191e84ce7df3fe53ed2"}}}}
{"actor":{"display_login":"Haroenv"}}