mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
feat: surface audit risk score in update API and UI
Return auditRiskScore and auditRiskLabel in update results so the dashboard can show security posture after both tracked-repo and regular-skill updates. auditGateTrackedRepo now returns the audit result alongside the blocked indicator.
This commit is contained in:
@@ -298,6 +298,8 @@ export interface UpdateResultItem {
|
||||
action: string; // "updated", "up-to-date", "skipped", "error", "blocked"
|
||||
message?: string;
|
||||
isRepo: boolean;
|
||||
auditRiskScore?: number;
|
||||
auditRiskLabel?: string;
|
||||
}
|
||||
|
||||
export interface AvailableTarget {
|
||||
|
||||
@@ -219,7 +219,10 @@ export default function SkillDetailPage() {
|
||||
const res = await api.update({ name: skillName, skipAudit });
|
||||
const item = res.results[0];
|
||||
if (item?.action === 'updated') {
|
||||
toast(`Updated: ${item.name} — ${item.message}`, 'success');
|
||||
const auditInfo = item.auditRiskLabel
|
||||
? ` · Security: ${item.auditRiskLabel.toUpperCase()}${item.auditRiskScore ? ` (${item.auditRiskScore}/100)` : ''}`
|
||||
: '';
|
||||
toast(`Updated: ${item.name} — ${item.message}${auditInfo}`, 'success');
|
||||
refetch();
|
||||
} else if (item?.action === 'up-to-date') {
|
||||
toast(`${item.name} is already up to date.`, 'info');
|
||||
|
||||
Reference in New Issue
Block a user