def has_trigger(buildconfig, trigger_type): if not has_triggers(buildconfig): return False triggers = buildconfig['spec']['triggers'] if not triggers: return False for t in triggers: if t.get('type') == trigger_type: return True
def has_trigger(buildconfig, trigger_type): if not has_triggers(buildconfig): return False triggers = buildconfig['spec']['triggers'] if not triggers: return False for t in triggers: if t.get('type') == trigger_type: return True