From 201308c1c5281d17d2789850dbaec8bdbae767f7 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 20 Dec 2024 15:06:54 -0330 Subject: [PATCH] Skip labels with no builds --- development/metamaskbot-build-announce.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/development/metamaskbot-build-announce.js b/development/metamaskbot-build-announce.js index 7bb10f510551..7f7d7ad53071 100755 --- a/development/metamaskbot-build-announce.js +++ b/development/metamaskbot-build-announce.js @@ -111,16 +111,20 @@ async function start() { const verifiedBuildMap = {}; await Promise.all( Object.entries(buildMap).map(async ([label, builds]) => { - verifiedBuildMap[label] = {}; + const verifiedBuilds = {}; await Promise.all( Object.entries(builds).map(async ([platform, url]) => { if (await artifactExists(url)) { - verifiedBuildMap[label][platform] = url; + verifiedBuilds[platform] = url; } else { console.warn(`Build missing: ${url}`); } }), ); + // Skip labels with no builds + if (Object.keys(verifiedBuilds).length > 0) { + verifiedBuildMap[label] = verifiedBuilds; + } }), );