export const ReviewContextResultFactory = {
    fromParsedReview(parsed) {
        return {
            kind: 'measured',
            blocking: parsed.blocking,
            warnings: parsed.warnings,
            suggestions: parsed.suggestions,
            score: parsed.score ?? 0,
            verdict: deriveVerdict(parsed),
        };
    },
};
function deriveVerdict(parsed) {
    if (parsed.blocking > 0) {
        return 'needs_fixes';
    }
    if (parsed.score !== null && parsed.score >= 8 && parsed.warnings === 0) {
        return 'ready_to_merge';
    }
    return 'needs_discussion';
}
//# sourceMappingURL=reviewContextResult.factory.js.map