GitHub PullRequestReviewCommentEvent at 2014-12-05 22:30:36
Repository: wp-cli
Actor: danielbachhuber
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments/21405349","id":21405349,"diff_hunk":"@@ -90,10 +90,16 @@ private function same_minor_release( $release_parts, $updates ) {\n \t * ## OPTIONS\n \t *\n \t * [--patch]\n-\t * : Compare only the first two parts of the version number.\n+\t * : Only list patch updates\n+\t *\n+\t * [--ignore-patch]\n+\t * : Do not list patch updates","path":"php/commands/cli.php","position":8,"original_position":8,"commit_id":"fc548076b58bf4a02e9c267b288a56cd05f86ee7","original_commit_id":"fc548076b58bf4a02e9c267b288a56cd05f86ee7","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"body":"Same comment as below (re `--no`)","created_at":"2014-12-05T22:30:36Z","updated_at":"2014-12-05T22:30:36Z","html_url":"https://github.com/wp-cli/wp-cli/pull/1535#discussion_r21405349","pull_request_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535","_links":{"self":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments/21405349"},"html":{"href":"https://github.com/wp-cli/wp-cli/pull/1535#discussion_r21405349"},"pull_request":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535"}}},"pull_request":{"url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535","id":25378409,"html_url":"https://github.com/wp-cli/wp-cli/pull/1535","diff_url":"https://github.com/wp-cli/wp-cli/pull/1535.diff","patch_url":"https://github.com/wp-cli/wp-cli/pull/1535.patch","issue_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1535","number":1535,"state":"open","locked":false,"title":"Implement `wp cli self-update`","user":{"login":"nyordanov","id":192220,"avatar_url":"https://avatars.githubusercontent.com/u/192220?v=3","gravatar_id":"","url":"https://api.github.com/users/nyordanov","html_url":"https://github.com/nyordanov","followers_url":"https://api.github.com/users/nyordanov/followers","following_url":"https://api.github.com/users/nyordanov/following{/other_user}","gists_url":"https://api.github.com/users/nyordanov/gists{/gist_id}","starred_url":"https://api.github.com/users/nyordanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyordanov/subscriptions","organizations_url":"https://api.github.com/users/nyordanov/orgs","repos_url":"https://api.github.com/users/nyordanov/repos","events_url":"https://api.github.com/users/nyordanov/events{/privacy}","received_events_url":"https://api.github.com/users/nyordanov/received_events","type":"User","site_admin":false},"body":"*This implements `wp cli self-update`, originally proposed in #522*\r\n\r\nI've reused the code for getting the url of the latest phar from `wp cli check-update`. A new `private function get_updates( $assoc_args )` is introduced which is used by both `check_update` and `self_update`.\r\n\r\nAn update is performed if all of these criteria are met:\r\n* WP-CLI is used as a Phar\r\n* The current Phar file is writable\r\n* There is an available update\r\n* The downloaded Phar can be executed (that is, the exit code of `php /path/to/downloaded/update --version` should be 0)\r\n* The permissions of the downloaded file can be changed so that they match the permissions of the current Phar\r\n\r\n-----\r\n\r\nI haven't added any tests. However, in order to create a test for this command, it should be possible to set `WP_CLI_VERSION` at build time.\r\n\r\nA manual test can be performed by decreasing `WP_CLI_VERSION` in [php/wp-cli.php](https://github.com/wp-cli/wp-cli/blob/master/php/wp-cli.php) and running this in a shell:\r\n\r\n```\r\nphp -dphar.readonly=0 ./utils/make-phar.php /tmp/wp-cli.phar &&\\\r\nchmod +x /tmp/wp-cli.phar &&\\\r\n/tmp/wp-cli.phar cli self-update --yes &&\\\r\n/tmp/wp-cli.phar --version\r\n```","created_at":"2014-12-02T22:03:53Z","updated_at":"2014-12-05T22:30:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17f7b5e6f3ea49c1d50b48300c397501ec7db93f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535/commits","review_comments_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535/comments","review_comment_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1535/comments","statuses_url":"https://api.github.com/repos/wp-cli/wp-cli/statuses/fc548076b58bf4a02e9c267b288a56cd05f86ee7","head":{"label":"nyordanov:issue-522","ref":"issue-522","sha":"fc548076b58bf4a02e9c267b288a56cd05f86ee7","user":{"login":"nyordanov","id":192220,"avatar_url":"https://avatars.githubusercontent.com/u/192220?v=3","gravatar_id":"","url":"https://api.github.com/users/nyordanov","html_url":"https://github.com/nyordanov","followers_url":"https://api.github.com/users/nyordanov/followers","following_url":"https://api.github.com/users/nyordanov/following{/other_user}","gists_url":"https://api.github.com/users/nyordanov/gists{/gist_id}","starred_url":"https://api.github.com/users/nyordanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyordanov/subscriptions","organizations_url":"https://api.github.com/users/nyordanov/orgs","repos_url":"https://api.github.com/users/nyordanov/repos","events_url":"https://api.github.com/users/nyordanov/events{/privacy}","received_events_url":"https://api.github.com/users/nyordanov/received_events","type":"User","site_admin":false},"repo":{"id":18474208,"name":"wp-cli","full_name":"nyordanov/wp-cli","owner":{"login":"nyordanov","id":192220,"avatar_url":"https://avatars.githubusercontent.com/u/192220?v=3","gravatar_id":"","url":"https://api.github.com/users/nyordanov","html_url":"https://github.com/nyordanov","followers_url":"https://api.github.com/users/nyordanov/followers","following_url":"https://api.github.com/users/nyordanov/following{/other_user}","gists_url":"https://api.github.com/users/nyordanov/gists{/gist_id}","starred_url":"https://api.github.com/users/nyordanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyordanov/subscriptions","organizations_url":"https://api.github.com/users/nyordanov/orgs","repos_url":"https://api.github.com/users/nyordanov/repos","events_url":"https://api.github.com/users/nyordanov/events{/privacy}","received_events_url":"https://api.github.com/users/nyordanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nyordanov/wp-cli","description":"A command line interface for WordPress","fork":true,"url":"https://api.github.com/repos/nyordanov/wp-cli","forks_url":"https://api.github.com/repos/nyordanov/wp-cli/forks","keys_url":"https://api.github.com/repos/nyordanov/wp-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyordanov/wp-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyordanov/wp-cli/teams","hooks_url":"https://api.github.com/repos/nyordanov/wp-cli/hooks","issue_events_url":"https://api.github.com/repos/nyordanov/wp-cli/issues/events{/number}","events_url":"https://api.github.com/repos/nyordanov/wp-cli/events","assignees_url":"https://api.github.com/repos/nyordanov/wp-cli/assignees{/user}","branches_url":"https://api.github.com/repos/nyordanov/wp-cli/branches{/branch}","tags_url":"https://api.github.com/repos/nyordanov/wp-cli/tags","blobs_url":"https://api.github.com/repos/nyordanov/wp-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyordanov/wp-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyordanov/wp-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyordanov/wp-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyordanov/wp-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/nyordanov/wp-cli/languages","stargazers_url":"https://api.github.com/repos/nyordanov/wp-cli/stargazers","contributors_url":"https://api.github.com/repos/nyordanov/wp-cli/contributors","subscribers_url":"https://api.github.com/repos/nyordanov/wp-cli/subscribers","subscription_url":"https://api.github.com/repos/nyordanov/wp-cli/subscription","commits_url":"https://api.github.com/repos/nyordanov/wp-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyordanov/wp-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyordanov/wp-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyordanov/wp-cli/issues/comments/{number}","contents_url":"https://api.github.com/repos/nyordanov/wp-cli/contents/{+path}","compare_url":"https://api.github.com/repos/nyordanov/wp-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyordanov/wp-cli/merges","archive_url":"https://api.github.com/repos/nyordanov/wp-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyordanov/wp-cli/downloads","issues_url":"https://api.github.com/repos/nyordanov/wp-cli/issues{/number}","pulls_url":"https://api.github.com/repos/nyordanov/wp-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/nyordanov/wp-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/nyordanov/wp-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyordanov/wp-cli/labels{/name}","releases_url":"https://api.github.com/repos/nyordanov/wp-cli/releases{/id}","created_at":"2014-04-05T19:10:42Z","updated_at":"2014-12-04T18:00:39Z","pushed_at":"2014-12-05T12:05:32Z","git_url":"git://github.com/nyordanov/wp-cli.git","ssh_url":"git@github.com:nyordanov/wp-cli.git","clone_url":"https://github.com/nyordanov/wp-cli.git","svn_url":"https://github.com/nyordanov/wp-cli","homepage":"http://wp-cli.org/","size":5845,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"wp-cli:master","ref":"master","sha":"ca5bc34a9144c809d9234ff56043ef7932f34f64","user":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars.githubusercontent.com/u/1570774?v=3","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":2360755,"name":"wp-cli","full_name":"wp-cli/wp-cli","owner":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars.githubusercontent.com/u/1570774?v=3","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/wp-cli","description":"A command line interface for WordPress","fork":false,"url":"https://api.github.com/repos/wp-cli/wp-cli","forks_url":"https://api.github.com/repos/wp-cli/wp-cli/forks","keys_url":"https://api.github.com/repos/wp-cli/wp-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wp-cli/wp-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wp-cli/wp-cli/teams","hooks_url":"https://api.github.com/repos/wp-cli/wp-cli/hooks","issue_events_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/events{/number}","events_url":"https://api.github.com/repos/wp-cli/wp-cli/events","assignees_url":"https://api.github.com/repos/wp-cli/wp-cli/assignees{/user}","branches_url":"https://api.github.com/repos/wp-cli/wp-cli/branches{/branch}","tags_url":"https://api.github.com/repos/wp-cli/wp-cli/tags","blobs_url":"https://api.github.com/repos/wp-cli/wp-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wp-cli/wp-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wp-cli/wp-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/wp-cli/wp-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wp-cli/wp-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/wp-cli/wp-cli/languages","stargazers_url":"https://api.github.com/repos/wp-cli/wp-cli/stargazers","contributors_url":"https://api.github.com/repos/wp-cli/wp-cli/contributors","subscribers_url":"https://api.github.com/repos/wp-cli/wp-cli/subscribers","subscription_url":"https://api.github.com/repos/wp-cli/wp-cli/subscription","commits_url":"https://api.github.com/repos/wp-cli/wp-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/wp-cli/wp-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/comments/{number}","contents_url":"https://api.github.com/repos/wp-cli/wp-cli/contents/{+path}","compare_url":"https://api.github.com/repos/wp-cli/wp-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wp-cli/wp-cli/merges","archive_url":"https://api.github.com/repos/wp-cli/wp-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wp-cli/wp-cli/downloads","issues_url":"https://api.github.com/repos/wp-cli/wp-cli/issues{/number}","pulls_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/wp-cli/wp-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/wp-cli/wp-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wp-cli/wp-cli/labels{/name}","releases_url":"https://api.github.com/repos/wp-cli/wp-cli/releases{/id}","created_at":"2011-09-10T12:51:59Z","updated_at":"2014-12-04T21:44:39Z","pushed_at":"2014-12-05T22:26:51Z","git_url":"git://github.com/wp-cli/wp-cli.git","ssh_url":"git@github.com:wp-cli/wp-cli.git","clone_url":"https://github.com/wp-cli/wp-cli.git","svn_url":"https://github.com/wp-cli/wp-cli","homepage":"http://wp-cli.org/","size":21302,"stargazers_count":1735,"watchers_count":1735,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":363,"mirror_url":null,"open_issues_count":132,"forks":363,"open_issues":132,"watchers":1735,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535"},"html":{"href":"https://github.com/wp-cli/wp-cli/pull/1535"},"issue":{"href":"https://api.github.com/repos/wp-cli/wp-cli/issues/1535"},"comments":{"href":"https://api.github.com/repos/wp-cli/wp-cli/issues/1535/comments"},"review_comments":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535/comments"},"review_comment":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/1535/commits"},"statuses":{"href":"https://api.github.com/repos/wp-cli/wp-cli/statuses/fc548076b58bf4a02e9c267b288a56cd05f86ee7"}}}}