{bootstrap.channel} · {bootstrap.status}
{bootstrap.quality_blockers > 0 && (
⛔ {bootstrap.quality_blockers} блокер(а)
)}
{bootstrap.quality_warnings > 0 && (
⚠️ {bootstrap.quality_warnings} предупреждение(й)
)}
{bootstrap.quality_issues?.length > 0 && (() => {
const CODE_LABELS = {
truncated_title: "Заголовок обрезан",
truncated_summary: "Описание обрезано",
placeholder_glyphs: "Нетипичные эмодзи",
few_new_sources: "Мало новых источников",
own_channel_as_source: "Собственный канал в источниках",
};
// Strip leading "filename.md: " from message
const stripFile = (msg) => msg.replace(/^[^\s:]+\.md:\s*/, "");
const blockers = bootstrap.quality_issues.filter((i) => i.level === "BLOCKER");
const warnings = bootstrap.quality_issues.filter((i) => i.level !== "BLOCKER");
// Warnings: grouped by code with count
const warnGroups = {};
warnings.forEach((iss) => {
const key = iss.code || "other";
if (!warnGroups[key]) warnGroups[key] = 0;
warnGroups[key]++;
});
return (
{blockers.map((iss, i) => (
⛔
{stripFile(iss.message)}
))}
{Object.entries(warnGroups).map(([code, count]) => (
⚠️
{count}×{" "}
{CODE_LABELS[code] || code}
))}
);
})()}