{"action":"opened","number":207,"pull_request":{"url":"https://api.github.com/repos/wp-cli/handbook/pulls/207","id":168236941,"html_url":"https://github.com/wp-cli/handbook/pull/207","diff_url":"https://github.com/wp-cli/handbook/pull/207.diff","patch_url":"https://github.com/wp-cli/handbook/pull/207.patch","issue_url":"https://api.github.com/repos/wp-cli/handbook/issues/207","number":207,"state":"open","locked":false,"title":"Separate non-bundled install; generate against current WP-CLI instance.","user":{"login":"gitlost","id":481982,"avatar_url":"https://avatars1.githubusercontent.com/u/481982?v=4","gravatar_id":"","url":"https://api.github.com/users/gitlost","html_url":"https://github.com/gitlost","followers_url":"https://api.github.com/users/gitlost/followers","following_url":"https://api.github.com/users/gitlost/following{/other_user}","gists_url":"https://api.github.com/users/gitlost/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlost/subscriptions","organizations_url":"https://api.github.com/users/gitlost/orgs","repos_url":"https://api.github.com/users/gitlost/repos","events_url":"https://api.github.com/users/gitlost/events{/privacy}","received_events_url":"https://api.github.com/users/gitlost/received_events","type":"User","site_admin":false},"body":"See https://github.com/wp-cli/handbook/pull/200#issuecomment-362240087\r\n\r\nAdds a separate `bin/install_packages.sh` script to be run before running the `handbook` commands that installs the 4 non-bundled packages in `bin/packages`. The `handbook gen-commands` command then just checks that they're installed.\r\n\r\nUses the current WP-CLI instance to generate the doc against rather than invoking a separate instance and insists that it is run with `WP_CLI_PACKAGES_DIR=bin/packages`, and warns if isn't run with `WP_CLI_CONFIG_PATH=/dev/null`.\r\n\r\nEmpties the `commands/` and `internal-api/` directories first to allow for removed commands/apis. This causes a change in the currently generated doc as `Utils\\wp_clear_object_cache()` was deprecated for v1.5.0 so isn't listed.\r\n\r\nAdds `--verbose` option to `gen-all` and `gen-commands` to only output individual command listings if set, to make output simpler.\r\n\r\nChanges `update_commands_data()` to take `$full` rather than `$parent` arg to simplify calling, and to just check `when_invoke` closure use arg is callable function (otherwise was getting an exception as can be set 2 ways in `CommandFactory::create_subcommand()`), and sets `repo_url` in subcommand loop on first subcommand found if not already set, and only sets in `$command_data` array if something to set.\r\n\r\nAwards \"Hack of the Codebase\" :1st_place_medal: to @danielbachhuber for getting closure use clause arg with `ReflectionFunction::getStaticVariables()`. Masterful!\r\n","created_at":"2018-02-09T13:16:30Z","updated_at":"2018-02-09T13:16:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/wp-cli/handbook/pulls/207/commits","review_comments_url":"https://api.github.com/repos/wp-cli/handbook/pulls/207/comments","review_comment_url":"https://api.github.com/repos/wp-cli/handbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wp-cli/handbook/issues/207/comments","statuses_url":"https://api.github.com/repos/wp-cli/handbook/statuses/a9c1941ab3cd8d2925e78e8b585c1054769184f2","head":{"label":"wp-cli:gen_commands-refactor","ref":"gen_commands-refactor","sha":"a9c1941ab3cd8d2925e78e8b585c1054769184f2","user":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars0.githubusercontent.com/u/1570774?v=4","gravatar_id":"","url":"https://api.github.com/users/wp-cli","html_url":"https://github.com/wp-cli","followers_url":"https://api.github.com/users/wp-cli/followers","following_url":"https://api.github.com/users/wp-cli/following{/other_user}","gists_url":"https://api.github.com/users/wp-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-cli/subscriptions","organizations_url":"https://api.github.com/users/wp-cli/orgs","repos_url":"https://api.github.com/users/wp-cli/repos","events_url":"https://api.github.com/users/wp-cli/events{/privacy}","received_events_url":"https://api.github.com/users/wp-cli/received_events","type":"Organization","site_admin":false},"repo":{"id":79474185,"name":"handbook","full_name":"wp-cli/handbook","owner":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars0.githubusercontent.com/u/1570774?v=4","gravatar_id":"","url":"https://api.github.com/users/wp-cli","html_url":"https://github.com/wp-cli","followers_url":"https://api.github.com/users/wp-cli/followers","following_url":"https://api.github.com/users/wp-cli/following{/other_user}","gists_url":"https://api.github.com/users/wp-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-cli/subscriptions","organizations_url":"https://api.github.com/users/wp-cli/orgs","repos_url":"https://api.github.com/users/wp-cli/repos","events_url":"https://api.github.com/users/wp-cli/events{/privacy}","received_events_url":"https://api.github.com/users/wp-cli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wp-cli/handbook","description":"Complete documentation for WP-CLI","fork":false,"url":"https://api.github.com/repos/wp-cli/handbook","forks_url":"https://api.github.com/repos/wp-cli/handbook/forks","keys_url":"https://api.github.com/repos/wp-cli/handbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wp-cli/handbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wp-cli/handbook/teams","hooks_url":"https://api.github.com/repos/wp-cli/handbook/hooks","issue_events_url":"https://api.github.com/repos/wp-cli/handbook/issues/events{/number}","events_url":"https://api.github.com/repos/wp-cli/handbook/events","assignees_url":"https://api.github.com/repos/wp-cli/handbook/assignees{/user}","branches_url":"https://api.github.com/repos/wp-cli/handbook/branches{/branch}","tags_url":"https://api.github.com/repos/wp-cli/handbook/tags","blobs_url":"https://api.github.com/repos/wp-cli/handbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wp-cli/handbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wp-cli/handbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/wp-cli/handbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wp-cli/handbook/statuses/{sha}","languages_url":"https://api.github.com/repos/wp-cli/handbook/languages","stargazers_url":"https://api.github.com/repos/wp-cli/handbook/stargazers","contributors_url":"https://api.github.com/repos/wp-cli/handbook/contributors","subscribers_url":"https://api.github.com/repos/wp-cli/handbook/subscribers","subscription_url":"https://api.github.com/repos/wp-cli/handbook/subscription","commits_url":"https://api.github.com/repos/wp-cli/handbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/wp-cli/handbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/wp-cli/handbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/wp-cli/handbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/wp-cli/handbook/contents/{+path}","compare_url":"https://api.github.com/repos/wp-cli/handbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wp-cli/handbook/merges","archive_url":"https://api.github.com/repos/wp-cli/handbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wp-cli/handbook/downloads","issues_url":"https://api.github.com/repos/wp-cli/handbook/issues{/number}","pulls_url":"https://api.github.com/repos/wp-cli/handbook/pulls{/number}","milestones_url":"https://api.github.com/repos/wp-cli/handbook/milestones{/number}","notifications_url":"https://api.github.com/repos/wp-cli/handbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wp-cli/handbook/labels{/name}","releases_url":"https://api.github.com/repos/wp-cli/handbook/releases{/id}","deployments_url":"https://api.github.com/repos/wp-cli/handbook/deployments","created_at":"2017-01-19T16:52:02Z","updated_at":"2018-01-20T14:46:37Z","pushed_at":"2018-02-09T12:21:12Z","git_url":"git://github.com/wp-cli/handbook.git","ssh_url":"git@github.com:wp-cli/handbook.git","clone_url":"https://github.com/wp-cli/handbook.git","svn_url":"https://github.com/wp-cli/handbook","homepage":"https://make.wordpress.org/cli/handbook/","size":4336,"stargazers_count":37,"watchers_count":37,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":71,"open_issues":11,"watchers":37,"default_branch":"master"}},"base":{"label":"wp-cli:master","ref":"master","sha":"a7f26371ceff9198a6162d4020d8fc5f5be2055d","user":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars0.githubusercontent.com/u/1570774?v=4","gravatar_id":"","url":"https://api.github.com/users/wp-cli","html_url":"https://github.com/wp-cli","followers_url":"https://api.github.com/users/wp-cli/followers","following_url":"https://api.github.com/users/wp-cli/following{/other_user}","gists_url":"https://api.github.com/users/wp-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-cli/subscriptions","organizations_url":"https://api.github.com/users/wp-cli/orgs","repos_url":"https://api.github.com/users/wp-cli/repos","events_url":"https://api.github.com/users/wp-cli/events{/privacy}","received_events_url":"https://api.github.com/users/wp-cli/received_events","type":"Organization","site_admin":false},"repo":{"id":79474185,"name":"handbook","full_name":"wp-cli/handbook","owner":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars0.githubusercontent.com/u/1570774?v=4","gravatar_id":"","url":"https://api.github.com/users/wp-cli","html_url":"https://github.com/wp-cli","followers_url":"https://api.github.com/users/wp-cli/followers","following_url":"https://api.github.com/users/wp-cli/following{/other_user}","gists_url":"https://api.github.com/users/wp-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-cli/subscriptions","organizations_url":"https://api.github.com/users/wp-cli/orgs","repos_url":"https://api.github.com/users/wp-cli/repos","events_url":"https://api.github.com/users/wp-cli/events{/privacy}","received_events_url":"https://api.github.com/users/wp-cli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wp-cli/handbook","description":"Complete documentation for WP-CLI","fork":false,"url":"https://api.github.com/repos/wp-cli/handbook","forks_url":"https://api.github.com/repos/wp-cli/handbook/forks","keys_url":"https://api.github.com/repos/wp-cli/handbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wp-cli/handbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wp-cli/handbook/teams","hooks_url":"https://api.github.com/repos/wp-cli/handbook/hooks","issue_events_url":"https://api.github.com/repos/wp-cli/handbook/issues/events{/number}","events_url":"https://api.github.com/repos/wp-cli/handbook/events","assignees_url":"https://api.github.com/repos/wp-cli/handbook/assignees{/user}","branches_url":"https://api.github.com/repos/wp-cli/handbook/branches{/branch}","tags_url":"https://api.github.com/repos/wp-cli/handbook/tags","blobs_url":"https://api.github.com/repos/wp-cli/handbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wp-cli/handbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wp-cli/handbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/wp-cli/handbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wp-cli/handbook/statuses/{sha}","languages_url":"https://api.github.com/repos/wp-cli/handbook/languages","stargazers_url":"https://api.github.com/repos/wp-cli/handbook/stargazers","contributors_url":"https://api.github.com/repos/wp-cli/handbook/contributors","subscribers_url":"https://api.github.com/repos/wp-cli/handbook/subscribers","subscription_url":"https://api.github.com/repos/wp-cli/handbook/subscription","commits_url":"https://api.github.com/repos/wp-cli/handbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/wp-cli/handbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/wp-cli/handbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/wp-cli/handbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/wp-cli/handbook/contents/{+path}","compare_url":"https://api.github.com/repos/wp-cli/handbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wp-cli/handbook/merges","archive_url":"https://api.github.com/repos/wp-cli/handbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wp-cli/handbook/downloads","issues_url":"https://api.github.com/repos/wp-cli/handbook/issues{/number}","pulls_url":"https://api.github.com/repos/wp-cli/handbook/pulls{/number}","milestones_url":"https://api.github.com/repos/wp-cli/handbook/milestones{/number}","notifications_url":"https://api.github.com/repos/wp-cli/handbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wp-cli/handbook/labels{/name}","releases_url":"https://api.github.com/repos/wp-cli/handbook/releases{/id}","deployments_url":"https://api.github.com/repos/wp-cli/handbook/deployments","created_at":"2017-01-19T16:52:02Z","updated_at":"2018-01-20T14:46:37Z","pushed_at":"2018-02-09T12:21:12Z","git_url":"git://github.com/wp-cli/handbook.git","ssh_url":"git@github.com:wp-cli/handbook.git","clone_url":"https://github.com/wp-cli/handbook.git","svn_url":"https://github.com/wp-cli/handbook","homepage":"https://make.wordpress.org/cli/handbook/","size":4336,"stargazers_count":37,"watchers_count":37,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":71,"open_issues":11,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wp-cli/handbook/pulls/207"},"html":{"href":"https://github.com/wp-cli/handbook/pull/207"},"issue":{"href":"https://api.github.com/repos/wp-cli/handbook/issues/207"},"comments":{"href":"https://api.github.com/repos/wp-cli/handbook/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/wp-cli/handbook/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/wp-cli/handbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wp-cli/handbook/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/wp-cli/handbook/statuses/a9c1941ab3cd8d2925e78e8b585c1054769184f2"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":112,"deletions":154,"changed_files":11}}
{"actor":{"display_login":"gitlost"}}