feat(release): guide selective gate remediation
This commit is contained in:
@@ -409,6 +409,11 @@
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.action.recommended {
|
||||
border-left: 4px solid var(--accent);
|
||||
background: var(--panel-alt);
|
||||
}
|
||||
|
||||
.action h3 {
|
||||
margin: 0 0 5px;
|
||||
font-size: 13px;
|
||||
@@ -1409,10 +1414,28 @@
|
||||
const units = plan.units || [];
|
||||
const compatibility = plan.compatibility || [];
|
||||
const steps = plan.dry_run_steps || [];
|
||||
if (!units.length && !compatibility.length && !steps.length) {
|
||||
const findings = plan.gate_findings || [];
|
||||
const recommendation = plan.recommended_action || null;
|
||||
if (!units.length && !compatibility.length && !steps.length && !recommendation) {
|
||||
elements.actions.innerHTML = `<div class="muted">No selective release candidates. Select repositories above to plan a release.</div>`;
|
||||
return;
|
||||
}
|
||||
const recommendationKind = plan.status === "blocked" ? "block" : plan.source_preflight_ready ? "ok" : "warn";
|
||||
const recommendationHtml = recommendation ? `<div class="action recommended">
|
||||
<h3>${pill("recommended next", recommendationKind)} ${escapeHtml(recommendation.title)}</h3>
|
||||
<p>${escapeHtml(recommendation.detail)}</p>
|
||||
<p class="action-meta"><strong>How to continue:</strong> ${escapeHtml(recommendation.remediation)}</p>
|
||||
</div>` : "";
|
||||
const findingHtml = findings.map((finding) => {
|
||||
const kind = finding.severity === "blocker" ? "block" : finding.severity === "warning" ? "warn" : "ok";
|
||||
const source = finding.source ? `${finding.source}: ${finding.actual || "-"} -> ${finding.expected || "-"}` : "";
|
||||
return `<div class="action">
|
||||
<h3>${pill(finding.severity, kind)} ${escapeHtml(finding.repo || "release")} · ${escapeHtml(finding.code)}</h3>
|
||||
<p>${escapeHtml(finding.message)}</p>
|
||||
${source ? `<p class="action-meta">${escapeHtml(source)}</p>` : ""}
|
||||
<p class="action-meta"><strong>Remediation:</strong> ${escapeHtml(finding.remediation)}</p>
|
||||
</div>`;
|
||||
}).join("");
|
||||
const unitHtml = units.map((unit) => {
|
||||
const blockers = unit.blockers.length ? `<p>${escapeHtml(unit.blockers.join("; "))}</p>` : "";
|
||||
const warnings = unit.warnings.length ? `<p>${escapeHtml(unit.warnings.join("; "))}</p>` : "";
|
||||
@@ -1439,6 +1462,8 @@
|
||||
</div>`;
|
||||
}).join("");
|
||||
elements.actions.innerHTML = `
|
||||
${recommendationHtml}
|
||||
${findingHtml}
|
||||
${unitHtml}
|
||||
${compatibilityHtml}
|
||||
${stepHtml}
|
||||
|
||||
Reference in New Issue
Block a user