Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save leonbarrett/670648 to your computer and use it in GitHub Desktop.

Select an option

Save leonbarrett/670648 to your computer and use it in GitHub Desktop.
Get Notify.io notifications each time you commit in Beanstalk
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