GitHub PullRequestReviewCommentEvent at 2014-06-16 07:05:47
Repository: gush
Actor: sstok
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gushphp/gush/pulls/comments/13793456","id":13793456,"diff_hunk":"@@ -0,0 +1,91 @@\n+<?php\n+\n+/**\n+ * This file is part of Gush package.\n+ *\n+ * (c) 2013-2014 Luis Cordova <cordoval@gmail.com>\n+ *\n+ * This source file is subject to the MIT license that is bundled\n+ * with this source code in the file LICENSE.\n+ */\n+\n+namespace Gush\\Command\\Core;\n+\n+use Gush\\Command\\BaseCommand;\n+use Symfony\\Component\\Console\\Helper\\DescriptorHelper;\n+use Symfony\\Component\\Console\\Input\\InputInterface;\n+use Symfony\\Component\\Console\\Output\\BufferedOutput;\n+use Symfony\\Component\\Console\\Output\\OutputInterface;\n+\n+/**\n+ * Create file for Bash Autocomplete\n+ *\n+ * @author Pierre du Plessis <pdples@gmail.com>\n+ */\n+class AutocompleteCommand extends BaseCommand\n+{\n+    const AUTOCOMPLETE_SCRIPT = '.gush-autocomplete.bash';\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    protected function configure()\n+    {\n+        $this\n+            ->setName('core:autocomplete')\n+            ->setDescription('Create file for Bash autocomplete')\n+            ->setHelp(\n+                <<<EOF\n+The <info>%command.name%</info> creates a script to autocomplete Gush commands in Bash:\n+\n+    <info>$ gush %command.name%</info>\n+\n+EOF\n+            )\n+        ;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    protected function execute(InputInterface $input, OutputInterface $output)\n+    {\n+        $buffer = new BufferedOutput();\n+        (new DescriptorHelper())->describe(\n+            $buffer,\n+            $this->getApplication(),\n+            ['format' => 'json']\n+        );\n+\n+        $autocomplete = $this->getHelper('autocomplete');\n+\n+        $script = $autocomplete->getAutoCompleteScript(json_decode($buffer->fetch(), true)['commands']);\n+\n+        /** @var \\Gush\\Application $application */\n+        $application = $this->getApplication();\n+        $config = $application->getConfig();\n+\n+        $scriptFile = $config->get('home').DIRECTORY_SEPARATOR.self::AUTOCOMPLETE_SCRIPT;\n+\n+        $file = @file_put_contents($scriptFile, $script);","path":"src/Command/Core/AutocompleteCommand.php","position":70,"original_position":70,"commit_id":"92efb958b417a564b8bddce68db1b79049f48e8f","original_commit_id":"92efb958b417a564b8bddce68db1b79049f48e8f","user":{"login":"sstok","id":904790,"avatar_url":"https://avatars.githubusercontent.com/u/904790?","gravatar_id":"03ba5fdb093ae442cacfee50902ea750","url":"https://api.github.com/users/sstok","html_url":"https://github.com/sstok","followers_url":"https://api.github.com/users/sstok/followers","following_url":"https://api.github.com/users/sstok/following{/other_user}","gists_url":"https://api.github.com/users/sstok/gists{/gist_id}","starred_url":"https://api.github.com/users/sstok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstok/subscriptions","organizations_url":"https://api.github.com/users/sstok/orgs","repos_url":"https://api.github.com/users/sstok/repos","events_url":"https://api.github.com/users/sstok/events{/privacy}","received_events_url":"https://api.github.com/users/sstok/received_events","type":"User","site_admin":false},"body":"Maybe use Symfony Filesystem::dump()?","created_at":"2014-06-16T07:05:47Z","updated_at":"2014-06-16T07:05:47Z","html_url":"https://github.com/gushphp/gush/pull/221#discussion_r13793456","pull_request_url":"https://api.github.com/repos/gushphp/gush/pulls/221","_links":{"self":{"href":"https://api.github.com/repos/gushphp/gush/pulls/comments/13793456"},"html":{"href":"https://github.com/gushphp/gush/pull/221#discussion_r13793456"},"pull_request":{"href":"https://api.github.com/repos/gushphp/gush/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/gushphp/gush/pulls/221","id":17155874,"html_url":"https://github.com/gushphp/gush/pull/221","diff_url":"https://github.com/gushphp/gush/pull/221.diff","patch_url":"https://github.com/gushphp/gush/pull/221.patch","issue_url":"https://api.github.com/repos/gushphp/gush/issues/221","number":221,"state":"open","title":"Add command to generate Bash autocomplete script","user":{"login":"pierredup","id":144858,"avatar_url":"https://avatars.githubusercontent.com/u/144858?","gravatar_id":"f2164bb16ed7c56b8897b064d9dd351d","url":"https://api.github.com/users/pierredup","html_url":"https://github.com/pierredup","followers_url":"https://api.github.com/users/pierredup/followers","following_url":"https://api.github.com/users/pierredup/following{/other_user}","gists_url":"https://api.github.com/users/pierredup/gists{/gist_id}","starred_url":"https://api.github.com/users/pierredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierredup/subscriptions","organizations_url":"https://api.github.com/users/pierredup/orgs","repos_url":"https://api.github.com/users/pierredup/repos","events_url":"https://api.github.com/users/pierredup/events{/privacy}","received_events_url":"https://api.github.com/users/pierredup/received_events","type":"User","site_admin":false},"body":"                   \r\n|Q            |A  |\r\n|---          |---|\r\n|Bug Fix?     |n  |\r\n|New Feature? |Y  |\r\n|BC Breaks?   |n  |\r\n|Deprecations?|n  |\r\n|Tests Pass?  |Y  |\r\n|Fixed Tickets|   |\r\n|License      |MIT|\r\n|Doc PR       |   |\r\n                   \r\n\r\nAdd command to generate script for Bash autocompletion. This script allows autocomplete support when typing \"gush\" followed by a [tab], which gives you all the available commands, as well as the options for the commands\r\n\r\nSent using [Gush](https://github.com/gushphp/gush)","created_at":"2014-06-15T20:26:34Z","updated_at":"2014-06-16T07:05:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70e843f6d88c7b1e75258a2832d27152b8c7b068","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gushphp/gush/pulls/221/commits","review_comments_url":"https://api.github.com/repos/gushphp/gush/pulls/221/comments","review_comment_url":"https://api.github.com/repos/gushphp/gush/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gushphp/gush/issues/221/comments","statuses_url":"https://api.github.com/repos/gushphp/gush/statuses/92efb958b417a564b8bddce68db1b79049f48e8f","head":{"label":"pierredup:autocomplete","ref":"autocomplete","sha":"92efb958b417a564b8bddce68db1b79049f48e8f","user":{"login":"pierredup","id":144858,"avatar_url":"https://avatars.githubusercontent.com/u/144858?","gravatar_id":"f2164bb16ed7c56b8897b064d9dd351d","url":"https://api.github.com/users/pierredup","html_url":"https://github.com/pierredup","followers_url":"https://api.github.com/users/pierredup/followers","following_url":"https://api.github.com/users/pierredup/following{/other_user}","gists_url":"https://api.github.com/users/pierredup/gists{/gist_id}","starred_url":"https://api.github.com/users/pierredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierredup/subscriptions","organizations_url":"https://api.github.com/users/pierredup/orgs","repos_url":"https://api.github.com/users/pierredup/repos","events_url":"https://api.github.com/users/pierredup/events{/privacy}","received_events_url":"https://api.github.com/users/pierredup/received_events","type":"User","site_admin":false},"repo":{"id":18711972,"name":"gush","full_name":"pierredup/gush","owner":{"login":"pierredup","id":144858,"avatar_url":"https://avatars.githubusercontent.com/u/144858?","gravatar_id":"f2164bb16ed7c56b8897b064d9dd351d","url":"https://api.github.com/users/pierredup","html_url":"https://github.com/pierredup","followers_url":"https://api.github.com/users/pierredup/followers","following_url":"https://api.github.com/users/pierredup/following{/other_user}","gists_url":"https://api.github.com/users/pierredup/gists{/gist_id}","starred_url":"https://api.github.com/users/pierredup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierredup/subscriptions","organizations_url":"https://api.github.com/users/pierredup/orgs","repos_url":"https://api.github.com/users/pierredup/repos","events_url":"https://api.github.com/users/pierredup/events{/privacy}","received_events_url":"https://api.github.com/users/pierredup/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pierredup/gush","description":"Gush - Rapid workflow for project maintainers and contributors","fork":true,"url":"https://api.github.com/repos/pierredup/gush","forks_url":"https://api.github.com/repos/pierredup/gush/forks","keys_url":"https://api.github.com/repos/pierredup/gush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pierredup/gush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pierredup/gush/teams","hooks_url":"https://api.github.com/repos/pierredup/gush/hooks","issue_events_url":"https://api.github.com/repos/pierredup/gush/issues/events{/number}","events_url":"https://api.github.com/repos/pierredup/gush/events","assignees_url":"https://api.github.com/repos/pierredup/gush/assignees{/user}","branches_url":"https://api.github.com/repos/pierredup/gush/branches{/branch}","tags_url":"https://api.github.com/repos/pierredup/gush/tags","blobs_url":"https://api.github.com/repos/pierredup/gush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pierredup/gush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pierredup/gush/git/refs{/sha}","trees_url":"https://api.github.com/repos/pierredup/gush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pierredup/gush/statuses/{sha}","languages_url":"https://api.github.com/repos/pierredup/gush/languages","stargazers_url":"https://api.github.com/repos/pierredup/gush/stargazers","contributors_url":"https://api.github.com/repos/pierredup/gush/contributors","subscribers_url":"https://api.github.com/repos/pierredup/gush/subscribers","subscription_url":"https://api.github.com/repos/pierredup/gush/subscription","commits_url":"https://api.github.com/repos/pierredup/gush/commits{/sha}","git_commits_url":"https://api.github.com/repos/pierredup/gush/git/commits{/sha}","comments_url":"https://api.github.com/repos/pierredup/gush/comments{/number}","issue_comment_url":"https://api.github.com/repos/pierredup/gush/issues/comments/{number}","contents_url":"https://api.github.com/repos/pierredup/gush/contents/{+path}","compare_url":"https://api.github.com/repos/pierredup/gush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pierredup/gush/merges","archive_url":"https://api.github.com/repos/pierredup/gush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pierredup/gush/downloads","issues_url":"https://api.github.com/repos/pierredup/gush/issues{/number}","pulls_url":"https://api.github.com/repos/pierredup/gush/pulls{/number}","milestones_url":"https://api.github.com/repos/pierredup/gush/milestones{/number}","notifications_url":"https://api.github.com/repos/pierredup/gush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pierredup/gush/labels{/name}","releases_url":"https://api.github.com/repos/pierredup/gush/releases{/id}","created_at":"2014-04-12T18:55:33Z","updated_at":"2014-06-15T21:12:16Z","pushed_at":"2014-06-15T21:12:16Z","git_url":"git://github.com/pierredup/gush.git","ssh_url":"git@github.com:pierredup/gush.git","clone_url":"https://github.com/pierredup/gush.git","svn_url":"https://github.com/pierredup/gush","homepage":"http://gushphp.org","size":2177,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gushphp:master","ref":"master","sha":"53dd44de0ad274a6d480623bad2e21e5d35ce413","user":{"login":"gushphp","id":6666950,"avatar_url":"https://avatars.githubusercontent.com/u/6666950?","gravatar_id":"9263d79a59870a613a50b5448eed7b5d","url":"https://api.github.com/users/gushphp","html_url":"https://github.com/gushphp","followers_url":"https://api.github.com/users/gushphp/followers","following_url":"https://api.github.com/users/gushphp/following{/other_user}","gists_url":"https://api.github.com/users/gushphp/gists{/gist_id}","starred_url":"https://api.github.com/users/gushphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gushphp/subscriptions","organizations_url":"https://api.github.com/users/gushphp/orgs","repos_url":"https://api.github.com/users/gushphp/repos","events_url":"https://api.github.com/users/gushphp/events{/privacy}","received_events_url":"https://api.github.com/users/gushphp/received_events","type":"Organization","site_admin":false},"repo":{"id":16789051,"name":"gush","full_name":"gushphp/gush","owner":{"login":"gushphp","id":6666950,"avatar_url":"https://avatars.githubusercontent.com/u/6666950?","gravatar_id":"9263d79a59870a613a50b5448eed7b5d","url":"https://api.github.com/users/gushphp","html_url":"https://github.com/gushphp","followers_url":"https://api.github.com/users/gushphp/followers","following_url":"https://api.github.com/users/gushphp/following{/other_user}","gists_url":"https://api.github.com/users/gushphp/gists{/gist_id}","starred_url":"https://api.github.com/users/gushphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gushphp/subscriptions","organizations_url":"https://api.github.com/users/gushphp/orgs","repos_url":"https://api.github.com/users/gushphp/repos","events_url":"https://api.github.com/users/gushphp/events{/privacy}","received_events_url":"https://api.github.com/users/gushphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gushphp/gush","description":"Open Source & Enterprise FAST project maintainance/contributing","fork":false,"url":"https://api.github.com/repos/gushphp/gush","forks_url":"https://api.github.com/repos/gushphp/gush/forks","keys_url":"https://api.github.com/repos/gushphp/gush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gushphp/gush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gushphp/gush/teams","hooks_url":"https://api.github.com/repos/gushphp/gush/hooks","issue_events_url":"https://api.github.com/repos/gushphp/gush/issues/events{/number}","events_url":"https://api.github.com/repos/gushphp/gush/events","assignees_url":"https://api.github.com/repos/gushphp/gush/assignees{/user}","branches_url":"https://api.github.com/repos/gushphp/gush/branches{/branch}","tags_url":"https://api.github.com/repos/gushphp/gush/tags","blobs_url":"https://api.github.com/repos/gushphp/gush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gushphp/gush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gushphp/gush/git/refs{/sha}","trees_url":"https://api.github.com/repos/gushphp/gush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gushphp/gush/statuses/{sha}","languages_url":"https://api.github.com/repos/gushphp/gush/languages","stargazers_url":"https://api.github.com/repos/gushphp/gush/stargazers","contributors_url":"https://api.github.com/repos/gushphp/gush/contributors","subscribers_url":"https://api.github.com/repos/gushphp/gush/subscribers","subscription_url":"https://api.github.com/repos/gushphp/gush/subscription","commits_url":"https://api.github.com/repos/gushphp/gush/commits{/sha}","git_commits_url":"https://api.github.com/repos/gushphp/gush/git/commits{/sha}","comments_url":"https://api.github.com/repos/gushphp/gush/comments{/number}","issue_comment_url":"https://api.github.com/repos/gushphp/gush/issues/comments/{number}","contents_url":"https://api.github.com/repos/gushphp/gush/contents/{+path}","compare_url":"https://api.github.com/repos/gushphp/gush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gushphp/gush/merges","archive_url":"https://api.github.com/repos/gushphp/gush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gushphp/gush/downloads","issues_url":"https://api.github.com/repos/gushphp/gush/issues{/number}","pulls_url":"https://api.github.com/repos/gushphp/gush/pulls{/number}","milestones_url":"https://api.github.com/repos/gushphp/gush/milestones{/number}","notifications_url":"https://api.github.com/repos/gushphp/gush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gushphp/gush/labels{/name}","releases_url":"https://api.github.com/repos/gushphp/gush/releases{/id}","created_at":"2014-02-13T02:14:36Z","updated_at":"2014-06-15T08:42:30Z","pushed_at":"2014-06-15T08:42:29Z","git_url":"git://github.com/gushphp/gush.git","ssh_url":"git@github.com:gushphp/gush.git","clone_url":"https://github.com/gushphp/gush.git","svn_url":"https://github.com/gushphp/gush","homepage":"http://gushphp.org","size":5133,"stargazers_count":110,"watchers_count":110,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":25,"mirror_url":null,"open_issues_count":14,"forks":25,"open_issues":14,"watchers":110,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gushphp/gush/pulls/221"},"html":{"href":"https://github.com/gushphp/gush/pull/221"},"issue":{"href":"https://api.github.com/repos/gushphp/gush/issues/221"},"comments":{"href":"https://api.github.com/repos/gushphp/gush/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/gushphp/gush/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/gushphp/gush/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gushphp/gush/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/gushphp/gush/statuses/92efb958b417a564b8bddce68db1b79049f48e8f"}}}}