From 7db7024cb36ea34289fddf5c7f66e7b4d7827146 Mon Sep 17 00:00:00 2001 From: Krzysztof Moch Date: Thu, 22 Aug 2024 11:22:11 +0200 Subject: [PATCH] fix: set does not have `find` method (#4110) --- .github/scripts/validate.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/validate.js b/.github/scripts/validate.js index 7a8b7d5b..b6f3cff7 100644 --- a/.github/scripts/validate.js +++ b/.github/scripts/validate.js @@ -190,7 +190,7 @@ const handleMissingInformation = async ({github, context, labels}) => { label.startsWith('missing-'), ); - const outdatedVersionLabel = labels.find((label) => + const outdatedVersionLabel = Array.from(labels).find((label) => label.startsWith('outdated-version'), ); @@ -220,7 +220,9 @@ const updateLabelsForMissingInfo = (labels) => { labels.add('Repro Provided'); } - if (labels.find((label) => label.startsWith('outdated-version'))) { + if ( + Array.from(labels).find((label) => label.startsWith('outdated-version')) + ) { labels.add('Newer Version Available'); } else { labels.delete('Newer Version Available');