Created
November 10, 2010 10:18
-
-
Save leonbarrett/670648 to your computer and use it in GitHub Desktop.
Get Notify.io notifications each time you commit in Beanstalk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function index(){ | |
| $this->load->library('notifyio_api'); | |
| $commit = $this->input->post('commit'); | |
| $decoded = json_decode($commit,true); | |
| date_default_timezone_set('Europe/London'); | |
| $commit_time = date("H:i",strtotime($decoded['time'])); | |
| $data = array( | |
| 'email'=>$decoded['author_email'], | |
| 'text'=>'Message: '.$decoded['message'], | |
| 'title'=>'Commit by '.$decoded['author_full_name'].' ('.$decoded['revision'].')', | |
| 'link'=>$decoded['changeset_url'], | |
| 'icon'=>YOUR ICON | |
| ); | |
| $this->notifyio_api->send_notification($data); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment