private function parse_bitbucket_webhook($request_data)
{
$new = $request_data['push']['changes'][0]['new'];
// What else could this be? For now, just expect branch.
if (empty($new) || 'branch' != $new['type']) {
return false;
}
$response = array();
$response['hash'] = $new['target']['hash'];
$response['branch'] = $new['name'];
return $response;
}