{"action":"created","comment":{"url":"https://api.github.com/repos/deployphp/recipes/pulls/comments/23968460","id":23968460,"diff_hunk":"@@ -0,0 +1,49 @@\n+<?php\n+/* (c) Tomas Majer <tomasmajer@gmail.com>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+/**\n+ * Notify Rabbit of successful deployment\n+ */\n+task('deploy:rabbit', function () {\n+    $config = get('rabbit', []);\n+\n+    if (!isset($config['message'])) {\n+        $releasePath = env()->getReleasePath();\n+        $host = config()->getHost();\n+        $prod = get('env', 'production');\n+        $config['message'] = \"Deployment to '{$host}' on *{$prod}* was successful\\n($releasePath)\";\n+    }\n+\n+    $defaultConfig = array(\n+        'host' => 'localhost',\n+        'port' => 5672,\n+        'username' => 'guest',\n+        'password' => 'guest',\n+    );\n+\n+    $config = array_merge($defaultConfig, $config);\n+\n+    if (!is_array($config) ||\n+        !isset($config['channel']) ||\n+        !isset($config['host']) ||\n+        !isset($config['port']) ||\n+        !isset($config['username']) ||\n+        !isset($config['password']))\n+    {\n+        throw new \\RuntimeException(\"<comment>Please configure rabbit config:</comment> <info>set('rabbit', array('channel' => 'channel', 'host' => 'host', 'port' => 'port', 'username' => 'username', 'password' => 'password'));</info>\");\n+    }\n+\n+    $connection = new \\PhpAmqpLib\\Connection\\AMQPConnection($config['host'], $config['port'], $config['username'], $config['password']);","path":"recipes/rabbit.php","position":40,"original_position":40,"commit_id":"65a9eb20d36c90b9197fb546739a3bb326945227","original_commit_id":"65a9eb20d36c90b9197fb546739a3bb326945227","user":{"login":"gordalina","id":787913,"avatar_url":"https://avatars.githubusercontent.com/u/787913?v=3","gravatar_id":"","url":"https://api.github.com/users/gordalina","html_url":"https://github.com/gordalina","followers_url":"https://api.github.com/users/gordalina/followers","following_url":"https://api.github.com/users/gordalina/following{/other_user}","gists_url":"https://api.github.com/users/gordalina/gists{/gist_id}","starred_url":"https://api.github.com/users/gordalina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gordalina/subscriptions","organizations_url":"https://api.github.com/users/gordalina/orgs","repos_url":"https://api.github.com/users/gordalina/repos","events_url":"https://api.github.com/users/gordalina/events{/privacy}","received_events_url":"https://api.github.com/users/gordalina/received_events","type":"User","site_admin":false},"body":"You should `use` FQCN and only instantiate here `AMQPConnection`","created_at":"2015-02-02T23:15:32Z","updated_at":"2015-02-02T23:15:32Z","html_url":"https://github.com/deployphp/recipes/pull/4#discussion_r23968460","pull_request_url":"https://api.github.com/repos/deployphp/recipes/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/deployphp/recipes/pulls/comments/23968460"},"html":{"href":"https://github.com/deployphp/recipes/pull/4#discussion_r23968460"},"pull_request":{"href":"https://api.github.com/repos/deployphp/recipes/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/deployphp/recipes/pulls/4","id":28511369,"html_url":"https://github.com/deployphp/recipes/pull/4","diff_url":"https://github.com/deployphp/recipes/pull/4.diff","patch_url":"https://github.com/deployphp/recipes/pull/4.patch","issue_url":"https://api.github.com/repos/deployphp/recipes/issues/4","number":4,"state":"open","locked":false,"title":"Added support for notifying rabbmiq server","user":{"login":"tomaj","id":446736,"avatar_url":"https://avatars.githubusercontent.com/u/446736?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaj","html_url":"https://github.com/tomaj","followers_url":"https://api.github.com/users/tomaj/followers","following_url":"https://api.github.com/users/tomaj/following{/other_user}","gists_url":"https://api.github.com/users/tomaj/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaj/subscriptions","organizations_url":"https://api.github.com/users/tomaj/orgs","repos_url":"https://api.github.com/users/tomaj/repos","events_url":"https://api.github.com/users/tomaj/events{/privacy}","received_events_url":"https://api.github.com/users/tomaj/received_events","type":"User","site_admin":false},"body":"I need notify rabbitmq on one project after deployment so i created recipe. I need one dependency for this - [videlalvaro/php-amqplib](https://github.com/videlalvaro/php-amqplib) than I am not sure if it is ok. If you would like to keep this library without external dependencies, than reject this pull request.","created_at":"2015-02-02T23:05:31Z","updated_at":"2015-02-02T23:15:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e94abee4b2af123746bbc082f9f0f8bbfef54de7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/deployphp/recipes/pulls/4/commits","review_comments_url":"https://api.github.com/repos/deployphp/recipes/pulls/4/comments","review_comment_url":"https://api.github.com/repos/deployphp/recipes/pulls/comments/{number}","comments_url":"https://api.github.com/repos/deployphp/recipes/issues/4/comments","statuses_url":"https://api.github.com/repos/deployphp/recipes/statuses/65a9eb20d36c90b9197fb546739a3bb326945227","head":{"label":"tomaj:rabbit","ref":"rabbit","sha":"65a9eb20d36c90b9197fb546739a3bb326945227","user":{"login":"tomaj","id":446736,"avatar_url":"https://avatars.githubusercontent.com/u/446736?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaj","html_url":"https://github.com/tomaj","followers_url":"https://api.github.com/users/tomaj/followers","following_url":"https://api.github.com/users/tomaj/following{/other_user}","gists_url":"https://api.github.com/users/tomaj/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaj/subscriptions","organizations_url":"https://api.github.com/users/tomaj/orgs","repos_url":"https://api.github.com/users/tomaj/repos","events_url":"https://api.github.com/users/tomaj/events{/privacy}","received_events_url":"https://api.github.com/users/tomaj/received_events","type":"User","site_admin":false},"repo":{"id":30072627,"name":"recipes","full_name":"tomaj/recipes","owner":{"login":"tomaj","id":446736,"avatar_url":"https://avatars.githubusercontent.com/u/446736?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaj","html_url":"https://github.com/tomaj","followers_url":"https://api.github.com/users/tomaj/followers","following_url":"https://api.github.com/users/tomaj/following{/other_user}","gists_url":"https://api.github.com/users/tomaj/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaj/subscriptions","organizations_url":"https://api.github.com/users/tomaj/orgs","repos_url":"https://api.github.com/users/tomaj/repos","events_url":"https://api.github.com/users/tomaj/events{/privacy}","received_events_url":"https://api.github.com/users/tomaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomaj/recipes","description":"Deployer Recipes","fork":true,"url":"https://api.github.com/repos/tomaj/recipes","forks_url":"https://api.github.com/repos/tomaj/recipes/forks","keys_url":"https://api.github.com/repos/tomaj/recipes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomaj/recipes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomaj/recipes/teams","hooks_url":"https://api.github.com/repos/tomaj/recipes/hooks","issue_events_url":"https://api.github.com/repos/tomaj/recipes/issues/events{/number}","events_url":"https://api.github.com/repos/tomaj/recipes/events","assignees_url":"https://api.github.com/repos/tomaj/recipes/assignees{/user}","branches_url":"https://api.github.com/repos/tomaj/recipes/branches{/branch}","tags_url":"https://api.github.com/repos/tomaj/recipes/tags","blobs_url":"https://api.github.com/repos/tomaj/recipes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomaj/recipes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomaj/recipes/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomaj/recipes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomaj/recipes/statuses/{sha}","languages_url":"https://api.github.com/repos/tomaj/recipes/languages","stargazers_url":"https://api.github.com/repos/tomaj/recipes/stargazers","contributors_url":"https://api.github.com/repos/tomaj/recipes/contributors","subscribers_url":"https://api.github.com/repos/tomaj/recipes/subscribers","subscription_url":"https://api.github.com/repos/tomaj/recipes/subscription","commits_url":"https://api.github.com/repos/tomaj/recipes/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomaj/recipes/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomaj/recipes/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomaj/recipes/issues/comments/{number}","contents_url":"https://api.github.com/repos/tomaj/recipes/contents/{+path}","compare_url":"https://api.github.com/repos/tomaj/recipes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomaj/recipes/merges","archive_url":"https://api.github.com/repos/tomaj/recipes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomaj/recipes/downloads","issues_url":"https://api.github.com/repos/tomaj/recipes/issues{/number}","pulls_url":"https://api.github.com/repos/tomaj/recipes/pulls{/number}","milestones_url":"https://api.github.com/repos/tomaj/recipes/milestones{/number}","notifications_url":"https://api.github.com/repos/tomaj/recipes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomaj/recipes/labels{/name}","releases_url":"https://api.github.com/repos/tomaj/recipes/releases{/id}","created_at":"2015-01-30T13:15:11Z","updated_at":"2015-01-30T14:02:22Z","pushed_at":"2015-02-02T23:03:31Z","git_url":"git://github.com/tomaj/recipes.git","ssh_url":"git@github.com:tomaj/recipes.git","clone_url":"https://github.com/tomaj/recipes.git","svn_url":"https://github.com/tomaj/recipes","homepage":null,"size":85,"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":"deployphp:master","ref":"master","sha":"6b759ce92d3bc5e0c6a6e3fe90dbe90fcc3992c3","user":{"login":"deployphp","id":8088857,"avatar_url":"https://avatars.githubusercontent.com/u/8088857?v=3","gravatar_id":"","url":"https://api.github.com/users/deployphp","html_url":"https://github.com/deployphp","followers_url":"https://api.github.com/users/deployphp/followers","following_url":"https://api.github.com/users/deployphp/following{/other_user}","gists_url":"https://api.github.com/users/deployphp/gists{/gist_id}","starred_url":"https://api.github.com/users/deployphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deployphp/subscriptions","organizations_url":"https://api.github.com/users/deployphp/orgs","repos_url":"https://api.github.com/users/deployphp/repos","events_url":"https://api.github.com/users/deployphp/events{/privacy}","received_events_url":"https://api.github.com/users/deployphp/received_events","type":"Organization","site_admin":false},"repo":{"id":26645616,"name":"recipes","full_name":"deployphp/recipes","owner":{"login":"deployphp","id":8088857,"avatar_url":"https://avatars.githubusercontent.com/u/8088857?v=3","gravatar_id":"","url":"https://api.github.com/users/deployphp","html_url":"https://github.com/deployphp","followers_url":"https://api.github.com/users/deployphp/followers","following_url":"https://api.github.com/users/deployphp/following{/other_user}","gists_url":"https://api.github.com/users/deployphp/gists{/gist_id}","starred_url":"https://api.github.com/users/deployphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deployphp/subscriptions","organizations_url":"https://api.github.com/users/deployphp/orgs","repos_url":"https://api.github.com/users/deployphp/repos","events_url":"https://api.github.com/users/deployphp/events{/privacy}","received_events_url":"https://api.github.com/users/deployphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deployphp/recipes","description":"Deployer Recipes","fork":false,"url":"https://api.github.com/repos/deployphp/recipes","forks_url":"https://api.github.com/repos/deployphp/recipes/forks","keys_url":"https://api.github.com/repos/deployphp/recipes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deployphp/recipes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deployphp/recipes/teams","hooks_url":"https://api.github.com/repos/deployphp/recipes/hooks","issue_events_url":"https://api.github.com/repos/deployphp/recipes/issues/events{/number}","events_url":"https://api.github.com/repos/deployphp/recipes/events","assignees_url":"https://api.github.com/repos/deployphp/recipes/assignees{/user}","branches_url":"https://api.github.com/repos/deployphp/recipes/branches{/branch}","tags_url":"https://api.github.com/repos/deployphp/recipes/tags","blobs_url":"https://api.github.com/repos/deployphp/recipes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deployphp/recipes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deployphp/recipes/git/refs{/sha}","trees_url":"https://api.github.com/repos/deployphp/recipes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deployphp/recipes/statuses/{sha}","languages_url":"https://api.github.com/repos/deployphp/recipes/languages","stargazers_url":"https://api.github.com/repos/deployphp/recipes/stargazers","contributors_url":"https://api.github.com/repos/deployphp/recipes/contributors","subscribers_url":"https://api.github.com/repos/deployphp/recipes/subscribers","subscription_url":"https://api.github.com/repos/deployphp/recipes/subscription","commits_url":"https://api.github.com/repos/deployphp/recipes/commits{/sha}","git_commits_url":"https://api.github.com/repos/deployphp/recipes/git/commits{/sha}","comments_url":"https://api.github.com/repos/deployphp/recipes/comments{/number}","issue_comment_url":"https://api.github.com/repos/deployphp/recipes/issues/comments/{number}","contents_url":"https://api.github.com/repos/deployphp/recipes/contents/{+path}","compare_url":"https://api.github.com/repos/deployphp/recipes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deployphp/recipes/merges","archive_url":"https://api.github.com/repos/deployphp/recipes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deployphp/recipes/downloads","issues_url":"https://api.github.com/repos/deployphp/recipes/issues{/number}","pulls_url":"https://api.github.com/repos/deployphp/recipes/pulls{/number}","milestones_url":"https://api.github.com/repos/deployphp/recipes/milestones{/number}","notifications_url":"https://api.github.com/repos/deployphp/recipes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deployphp/recipes/labels{/name}","releases_url":"https://api.github.com/repos/deployphp/recipes/releases{/id}","created_at":"2014-11-14T15:53:06Z","updated_at":"2015-01-30T13:59:03Z","pushed_at":"2015-01-30T23:05:51Z","git_url":"git://github.com/deployphp/recipes.git","ssh_url":"git@github.com:deployphp/recipes.git","clone_url":"https://github.com/deployphp/recipes.git","svn_url":"https://github.com/deployphp/recipes","homepage":null,"size":152,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deployphp/recipes/pulls/4"},"html":{"href":"https://github.com/deployphp/recipes/pull/4"},"issue":{"href":"https://api.github.com/repos/deployphp/recipes/issues/4"},"comments":{"href":"https://api.github.com/repos/deployphp/recipes/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/deployphp/recipes/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/deployphp/recipes/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/deployphp/recipes/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/deployphp/recipes/statuses/65a9eb20d36c90b9197fb546739a3bb326945227"}}}}