diff --git a/.github/workflows/sync-keyword.yml b/.github/workflows/sync-keyword.yml index 6e41602..bd33f34 100644 --- a/.github/workflows/sync-keyword.yml +++ b/.github/workflows/sync-keyword.yml @@ -59,7 +59,7 @@ jobs: # Store skipped packages for Discord if [ "$skipped" -gt 0 ]; then - skippedList=$(echo "$response" | jq -r '.data.skippedPackages[]?' 2>/dev/null | paste -sd ", " - || echo "") + skippedList=$(echo "$response" | jq -r '.data.skippedPackages[]? | "\(.name) - \(.reason)"' 2>/dev/null | paste -sd "\n" - || echo "") if [ -n "$skippedList" ]; then echo "$skippedList" > /tmp/skipped_packages.txt fi diff --git a/apps/web/src/app/api/sync/keyword/route.ts b/apps/web/src/app/api/sync/keyword/route.ts index e3fd8f2..f338386 100644 --- a/apps/web/src/app/api/sync/keyword/route.ts +++ b/apps/web/src/app/api/sync/keyword/route.ts @@ -30,7 +30,7 @@ export async function POST(request: NextRequest) { let skipped = 0; let errors = 0; const errorMessages: string[] = []; - const skippedPackages: string[] = []; + const skippedPackages: Array<{ name: string; reason: string }> = []; try { // Search for packages with 'tpmjs-tool' keyword @@ -48,14 +48,14 @@ export async function POST(request: NextRequest) { // Skip if package not found if (!pkg) { skipped++; - skippedPackages.push(result.package.name); + skippedPackages.push({ name: result.package.name, reason: 'package not found' }); continue; } // Check if package has tpmjs field if (!pkg.tpmjs) { skipped++; - skippedPackages.push(pkg.name); + skippedPackages.push({ name: pkg.name, reason: 'missing tpmjs field' }); continue; } @@ -63,7 +63,7 @@ export async function POST(request: NextRequest) { const validation = validateTpmjsField(pkg.tpmjs); if (!validation.valid || !validation.data) { skipped++; - skippedPackages.push(pkg.name); + skippedPackages.push({ name: pkg.name, reason: 'invalid tpmjs field' }); continue; }