export function evaluateQualityGate(input) {
    if (input.threshold === null) {
        return { allowed: true };
    }
    if (input.latestScore === null) {
        return { allowed: true };
    }
    if (input.blockingIssues > 0) {
        return {
            allowed: false,
            reason: 'blockers-present',
            message: 'Issues bloquantes non résolues',
        };
    }
    if (input.latestScore < input.threshold) {
        return {
            allowed: false,
            reason: 'below-threshold',
            message: `Seuil qualité non atteint (${input.latestScore}/10 < ${input.threshold}/10)`,
        };
    }
    return { allowed: true };
}
//# sourceMappingURL=qualityGate.js.map