// PEP-23: project autonomy in «⋯ Настройки проекта» — preset levels and the individual settings. import { AUTONOMY_LEVEL_HINT, AUTONOMY_LEVEL_RU, AUTONOMY_LEVELS, autonomyLevel, type AutonomyLevel, type AutonomySettings } from "@peppa/core"; import { setAutonomyAction } from "@/app/(app)/actions"; import { Hidden } from "@/components/cards"; import { Button } from "@/components/ui/button"; import { Input, Label, NativeSelect } from "@/components/ui/input"; export function AutonomyPanel({ projectId, settings, back, engineer = false }: { projectId: number; settings: AutonomySettings; back: string; /** PEP-123: the detailed settings speak of merges and pipelines — «Инженер» only. */ engineer?: boolean }) { const current = autonomyLevel(settings); const s = settings; return (
{(Object.keys(AUTONOMY_LEVELS) as AutonomyLevel[]).map((level) => (
))} {current === "custom" && ( )}

{current === "custom" ? "Своя комбинация настроек ниже." : AUTONOMY_LEVEL_HINT[current]}

{engineer && (
Настроить подробно
с до
)} {engineer &&

PR, меняющий конвейер (.gitea/, checks, deploy), сам не мержится и не закрывается — его принимает PM.

}
); }