def trigger(registry, xml_parent, data):
 tconfig = XML.SubElement(xml_parent, 'hudson.tasks.BuildTrigger')
 childProjects = XML.SubElement(tconfig, 'childProjects')
 childProjects.text = data['project']
 tthreshold = XML.SubElement(tconfig, 'threshold')
 threshold = data.get('threshold', 'SUCCESS')
 supported_thresholds = ['SUCCESS', 'UNSTABLE', 'FAILURE']
 if (threshold not in supported_thresholds):
  raise JenkinsJobsException(('threshold must be one of %s' % ', '.join(supported_thresholds)))
 tname = XML.SubElement(tthreshold, 'name')
 tname.text = hudson_model.THRESHOLDS[threshold]['name']
 tordinal = XML.SubElement(tthreshold, 'ordinal')
 tordinal.text = hudson_model.THRESHOLDS[threshold]['ordinal']
 tcolor = XML.SubElement(tthreshold, 'color')
 tcolor.text = hudson_model.THRESHOLDS[threshold]['color']

def trigger ( registry , xml_parent , data ) : tconfig = XML . SubElement ( xml_parent , 'hudson.tasks.BuildTrigger' ) childProjects = XML . SubElement ( tconfig , 'childProjects' ) childProjects . text = data [ 'project' ] tthreshold = XML . SubElement ( tconfig , 'threshold' ) threshold = data . get ( 'threshold' , 'SUCCESS' ) supported_thresholds = [ 'SUCCESS' , 'UNSTABLE' , 'FAILURE' ] if ( threshold not in supported_thresholds ) : raise JenkinsJobsException ( ( 'threshold must be one of %s' % ', ' . join ( supported_thresholds ) ) ) tname = XML . SubElement ( tthreshold , 'name' ) tname . text = hudson_model . THRESHOLDS [ threshold ] [ 'name' ] tordinal = XML . SubElement ( tthreshold , 'ordinal' ) tordinal . text = hudson_model . THRESHOLDS [ threshold ] [ 'ordinal' ] tcolor = XML . SubElement ( tthreshold , 'color' ) tcolor . text = hudson_model . THRESHOLDS [ threshold ] [ 'color' ]
trigger a maker ifttt recipe .