# Yammer Recipe ```php require 'contrib/yammer.php'; ``` [Source](/contrib/yammer.php) Add hook on deploy: ```php before('deploy', 'yammer:notify'); ``` ## Configuration - `yammer_url` – The URL to the message endpoint, default is https://www.yammer.com/api/v1/messages.json - `yammer_token` *(required)* – Yammer auth token - `yammer_group_id` *(required)* - Group ID - `yammer_title` – the title of application, default `{{application}}` - `yammer_body` – notification message template, default: ``` {{user}} deploying {{branch}} to {{target}} ``` - `yammer_success_body` – success template, default: ``` Deploy to {{target}} successful ``` - `yammer_failure_body` – failure template, default: ``` Deploy to {{target}} failed ``` ## Usage If you want to notify only about beginning of deployment add this line only: ```php before('deploy', 'yammer:notify'); ``` If you want to notify about successful end of deployment add this too: ```php after('deploy:success', 'yammer:notify:success'); ``` If you want to notify about failed deployment add this too: ```php after('deploy:failed', 'yammer:notify:failure'); ``` ## Configuration ### yammer_url [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L54) ```php title="Default value" 'https://www.yammer.com/api/v1/messages.json' ``` ### yammer_title [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L57) Title of project ```php title="Default value" return get('application', 'Project'); ``` ### yammer_body [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L62) Deploy message ```php title="Default value" '{{user}} deploying {{branch}} to {{target}}' ``` ### yammer_success_body [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L63) ```php title="Default value" 'Deploy to {{target}} successful' ``` ### yammer_failure_body [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L64) ```php title="Default value" 'Deploy to {{target}} failed' ``` ## Tasks ### yammer:notify [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L67) Notifies Yammer. ### yammer:notify:success [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L86) Notifies Yammer about deploy finish. ### yammer:notify:failure [Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L105) Notifies Yammer about deploy failure.