{"action":"created","comment":{"url":"https://api.github.com/repos/lerna/lerna/pulls/comments/63656560","id":63656560,"diff_hunk":"@@ -12,7 +13,20 @@ export default class RunCommand extends Command {\n       return;\n     }\n \n-    this.packagesWithScript = this.packages\n+    let packagesToRunCommandIn = this.packages;\n+\n+    if (this.flags.restrictTo && `${this.flags.restrictTo}`.length > 0) {","path":"src/commands/RunCommand.js","position":15,"original_position":15,"commit_id":"00ae218bcdf5b6a1ad711875fc7a0152ceae5ff6","original_commit_id":"00ae218bcdf5b6a1ad711875fc7a0152ceae5ff6","user":{"login":"thejameskyle","id":952783,"avatar_url":"https://avatars.githubusercontent.com/u/952783?v=3","gravatar_id":"","url":"https://api.github.com/users/thejameskyle","html_url":"https://github.com/thejameskyle","followers_url":"https://api.github.com/users/thejameskyle/followers","following_url":"https://api.github.com/users/thejameskyle/following{/other_user}","gists_url":"https://api.github.com/users/thejameskyle/gists{/gist_id}","starred_url":"https://api.github.com/users/thejameskyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejameskyle/subscriptions","organizations_url":"https://api.github.com/users/thejameskyle/orgs","repos_url":"https://api.github.com/users/thejameskyle/repos","events_url":"https://api.github.com/users/thejameskyle/events{/privacy}","received_events_url":"https://api.github.com/users/thejameskyle/received_events","type":"User","site_admin":false},"body":"I think it's better that it doesn't run anything than trying to run everything","created_at":"2016-05-18T07:23:53Z","updated_at":"2016-05-18T07:23:53Z","html_url":"https://github.com/lerna/lerna/pull/145#discussion_r63656560","pull_request_url":"https://api.github.com/repos/lerna/lerna/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/lerna/lerna/pulls/comments/63656560"},"html":{"href":"https://github.com/lerna/lerna/pull/145#discussion_r63656560"},"pull_request":{"href":"https://api.github.com/repos/lerna/lerna/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/lerna/lerna/pulls/145","id":70478860,"html_url":"https://github.com/lerna/lerna/pull/145","diff_url":"https://github.com/lerna/lerna/pull/145.diff","patch_url":"https://github.com/lerna/lerna/pull/145.patch","issue_url":"https://api.github.com/repos/lerna/lerna/issues/145","number":145,"state":"open","locked":false,"title":"feat: --restrict-to={glob} for \"run\" command","user":{"login":"joscha","id":188038,"avatar_url":"https://avatars.githubusercontent.com/u/188038?v=3","gravatar_id":"","url":"https://api.github.com/users/joscha","html_url":"https://github.com/joscha","followers_url":"https://api.github.com/users/joscha/followers","following_url":"https://api.github.com/users/joscha/following{/other_user}","gists_url":"https://api.github.com/users/joscha/gists{/gist_id}","starred_url":"https://api.github.com/users/joscha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joscha/subscriptions","organizations_url":"https://api.github.com/users/joscha/orgs","repos_url":"https://api.github.com/users/joscha/repos","events_url":"https://api.github.com/users/joscha/events{/privacy}","received_events_url":"https://api.github.com/users/joscha/received_events","type":"User","site_admin":false},"body":"This adds a flag `--restrict-to` that takes a glob to restrict a command to be run to the packages matched by the glob.\r\n\r\nimplements #143","created_at":"2016-05-18T07:14:19Z","updated_at":"2016-05-18T07:23:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2926148dc15ff921bb3e15c87d7784abc577c7a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lerna/lerna/pulls/145/commits","review_comments_url":"https://api.github.com/repos/lerna/lerna/pulls/145/comments","review_comment_url":"https://api.github.com/repos/lerna/lerna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lerna/lerna/issues/145/comments","statuses_url":"https://api.github.com/repos/lerna/lerna/statuses/00ae218bcdf5b6a1ad711875fc7a0152ceae5ff6","head":{"label":"joscha:143-add-restrict-to-for-run-command","ref":"143-add-restrict-to-for-run-command","sha":"00ae218bcdf5b6a1ad711875fc7a0152ceae5ff6","user":{"login":"joscha","id":188038,"avatar_url":"https://avatars.githubusercontent.com/u/188038?v=3","gravatar_id":"","url":"https://api.github.com/users/joscha","html_url":"https://github.com/joscha","followers_url":"https://api.github.com/users/joscha/followers","following_url":"https://api.github.com/users/joscha/following{/other_user}","gists_url":"https://api.github.com/users/joscha/gists{/gist_id}","starred_url":"https://api.github.com/users/joscha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joscha/subscriptions","organizations_url":"https://api.github.com/users/joscha/orgs","repos_url":"https://api.github.com/users/joscha/repos","events_url":"https://api.github.com/users/joscha/events{/privacy}","received_events_url":"https://api.github.com/users/joscha/received_events","type":"User","site_admin":false},"repo":{"id":58341480,"name":"lerna","full_name":"joscha/lerna","owner":{"login":"joscha","id":188038,"avatar_url":"https://avatars.githubusercontent.com/u/188038?v=3","gravatar_id":"","url":"https://api.github.com/users/joscha","html_url":"https://github.com/joscha","followers_url":"https://api.github.com/users/joscha/followers","following_url":"https://api.github.com/users/joscha/following{/other_user}","gists_url":"https://api.github.com/users/joscha/gists{/gist_id}","starred_url":"https://api.github.com/users/joscha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joscha/subscriptions","organizations_url":"https://api.github.com/users/joscha/orgs","repos_url":"https://api.github.com/users/joscha/repos","events_url":"https://api.github.com/users/joscha/events{/privacy}","received_events_url":"https://api.github.com/users/joscha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joscha/lerna","description":":dragon: A tool for managing JavaScript projects with multiple packages.","fork":true,"url":"https://api.github.com/repos/joscha/lerna","forks_url":"https://api.github.com/repos/joscha/lerna/forks","keys_url":"https://api.github.com/repos/joscha/lerna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joscha/lerna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joscha/lerna/teams","hooks_url":"https://api.github.com/repos/joscha/lerna/hooks","issue_events_url":"https://api.github.com/repos/joscha/lerna/issues/events{/number}","events_url":"https://api.github.com/repos/joscha/lerna/events","assignees_url":"https://api.github.com/repos/joscha/lerna/assignees{/user}","branches_url":"https://api.github.com/repos/joscha/lerna/branches{/branch}","tags_url":"https://api.github.com/repos/joscha/lerna/tags","blobs_url":"https://api.github.com/repos/joscha/lerna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joscha/lerna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joscha/lerna/git/refs{/sha}","trees_url":"https://api.github.com/repos/joscha/lerna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joscha/lerna/statuses/{sha}","languages_url":"https://api.github.com/repos/joscha/lerna/languages","stargazers_url":"https://api.github.com/repos/joscha/lerna/stargazers","contributors_url":"https://api.github.com/repos/joscha/lerna/contributors","subscribers_url":"https://api.github.com/repos/joscha/lerna/subscribers","subscription_url":"https://api.github.com/repos/joscha/lerna/subscription","commits_url":"https://api.github.com/repos/joscha/lerna/commits{/sha}","git_commits_url":"https://api.github.com/repos/joscha/lerna/git/commits{/sha}","comments_url":"https://api.github.com/repos/joscha/lerna/comments{/number}","issue_comment_url":"https://api.github.com/repos/joscha/lerna/issues/comments{/number}","contents_url":"https://api.github.com/repos/joscha/lerna/contents/{+path}","compare_url":"https://api.github.com/repos/joscha/lerna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joscha/lerna/merges","archive_url":"https://api.github.com/repos/joscha/lerna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joscha/lerna/downloads","issues_url":"https://api.github.com/repos/joscha/lerna/issues{/number}","pulls_url":"https://api.github.com/repos/joscha/lerna/pulls{/number}","milestones_url":"https://api.github.com/repos/joscha/lerna/milestones{/number}","notifications_url":"https://api.github.com/repos/joscha/lerna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joscha/lerna/labels{/name}","releases_url":"https://api.github.com/repos/joscha/lerna/releases{/id}","deployments_url":"https://api.github.com/repos/joscha/lerna/deployments","created_at":"2016-05-09T02:00:09Z","updated_at":"2016-05-09T02:00:10Z","pushed_at":"2016-05-18T07:17:25Z","git_url":"git://github.com/joscha/lerna.git","ssh_url":"git@github.com:joscha/lerna.git","clone_url":"https://github.com/joscha/lerna.git","svn_url":"https://github.com/joscha/lerna","homepage":"","size":214,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"lerna:master","ref":"master","sha":"d1166c8ec57a2457fb39bcf0eb88926bf2776489","user":{"login":"lerna","id":19333396,"avatar_url":"https://avatars.githubusercontent.com/u/19333396?v=3","gravatar_id":"","url":"https://api.github.com/users/lerna","html_url":"https://github.com/lerna","followers_url":"https://api.github.com/users/lerna/followers","following_url":"https://api.github.com/users/lerna/following{/other_user}","gists_url":"https://api.github.com/users/lerna/gists{/gist_id}","starred_url":"https://api.github.com/users/lerna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lerna/subscriptions","organizations_url":"https://api.github.com/users/lerna/orgs","repos_url":"https://api.github.com/users/lerna/repos","events_url":"https://api.github.com/users/lerna/events{/privacy}","received_events_url":"https://api.github.com/users/lerna/received_events","type":"Organization","site_admin":false},"repo":{"id":47394776,"name":"lerna","full_name":"lerna/lerna","owner":{"login":"lerna","id":19333396,"avatar_url":"https://avatars.githubusercontent.com/u/19333396?v=3","gravatar_id":"","url":"https://api.github.com/users/lerna","html_url":"https://github.com/lerna","followers_url":"https://api.github.com/users/lerna/followers","following_url":"https://api.github.com/users/lerna/following{/other_user}","gists_url":"https://api.github.com/users/lerna/gists{/gist_id}","starred_url":"https://api.github.com/users/lerna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lerna/subscriptions","organizations_url":"https://api.github.com/users/lerna/orgs","repos_url":"https://api.github.com/users/lerna/repos","events_url":"https://api.github.com/users/lerna/events{/privacy}","received_events_url":"https://api.github.com/users/lerna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lerna/lerna","description":":dragon: A tool for managing JavaScript projects with multiple packages.","fork":false,"url":"https://api.github.com/repos/lerna/lerna","forks_url":"https://api.github.com/repos/lerna/lerna/forks","keys_url":"https://api.github.com/repos/lerna/lerna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lerna/lerna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lerna/lerna/teams","hooks_url":"https://api.github.com/repos/lerna/lerna/hooks","issue_events_url":"https://api.github.com/repos/lerna/lerna/issues/events{/number}","events_url":"https://api.github.com/repos/lerna/lerna/events","assignees_url":"https://api.github.com/repos/lerna/lerna/assignees{/user}","branches_url":"https://api.github.com/repos/lerna/lerna/branches{/branch}","tags_url":"https://api.github.com/repos/lerna/lerna/tags","blobs_url":"https://api.github.com/repos/lerna/lerna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lerna/lerna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lerna/lerna/git/refs{/sha}","trees_url":"https://api.github.com/repos/lerna/lerna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lerna/lerna/statuses/{sha}","languages_url":"https://api.github.com/repos/lerna/lerna/languages","stargazers_url":"https://api.github.com/repos/lerna/lerna/stargazers","contributors_url":"https://api.github.com/repos/lerna/lerna/contributors","subscribers_url":"https://api.github.com/repos/lerna/lerna/subscribers","subscription_url":"https://api.github.com/repos/lerna/lerna/subscription","commits_url":"https://api.github.com/repos/lerna/lerna/commits{/sha}","git_commits_url":"https://api.github.com/repos/lerna/lerna/git/commits{/sha}","comments_url":"https://api.github.com/repos/lerna/lerna/comments{/number}","issue_comment_url":"https://api.github.com/repos/lerna/lerna/issues/comments{/number}","contents_url":"https://api.github.com/repos/lerna/lerna/contents/{+path}","compare_url":"https://api.github.com/repos/lerna/lerna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lerna/lerna/merges","archive_url":"https://api.github.com/repos/lerna/lerna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lerna/lerna/downloads","issues_url":"https://api.github.com/repos/lerna/lerna/issues{/number}","pulls_url":"https://api.github.com/repos/lerna/lerna/pulls{/number}","milestones_url":"https://api.github.com/repos/lerna/lerna/milestones{/number}","notifications_url":"https://api.github.com/repos/lerna/lerna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lerna/lerna/labels{/name}","releases_url":"https://api.github.com/repos/lerna/lerna/releases{/id}","deployments_url":"https://api.github.com/repos/lerna/lerna/deployments","created_at":"2015-12-04T09:36:55Z","updated_at":"2016-05-17T23:27:29Z","pushed_at":"2016-05-18T07:17:26Z","git_url":"git://github.com/lerna/lerna.git","ssh_url":"git@github.com:lerna/lerna.git","clone_url":"https://github.com/lerna/lerna.git","svn_url":"https://github.com/lerna/lerna","homepage":"https://lernajs.io","size":260,"stargazers_count":596,"watchers_count":596,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":39,"forks":45,"open_issues":39,"watchers":596,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lerna/lerna/pulls/145"},"html":{"href":"https://github.com/lerna/lerna/pull/145"},"issue":{"href":"https://api.github.com/repos/lerna/lerna/issues/145"},"comments":{"href":"https://api.github.com/repos/lerna/lerna/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/lerna/lerna/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/lerna/lerna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lerna/lerna/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/lerna/lerna/statuses/00ae218bcdf5b6a1ad711875fc7a0152ceae5ff6"}}}}