def webhook_notification(version, build, hook_url):
 project = version.project
 data = json.dumps({'name': project.name, 'slug': project.slug, 'build': {'id': build.id, 'success': build.success, 'date': build.date.strftime('%Y-%m-%d %H:%M:%S')}})
 log.debug(LOG_TEMPLATE.format(project=project.slug, version='', msg=('sending notification to: %s' % hook_url)))
 requests.post(hook_url, data=data)

def webhook_notification ( version , build , hook_url ) : project = version . project data = json . dumps ( { 'name' : project . name , 'slug' : project . slug , 'build' : { 'id' : build . id , 'success' : build . success , 'date' : build . date . strftime ( '%Y-%m-%d %H:%M:%S' ) } } ) log . debug ( LOG_TEMPLATE . format ( project = project . slug , version = '' , msg = ( 'sending notification to: %s' % hook_url ) ) ) requests . post ( hook_url , data = data )
send webhook notification for project webhook .