fix: set does not have find method (#4110)

This commit is contained in:
Krzysztof Moch
2024-08-22 11:22:11 +02:00
committed by GitHub
parent ca795f298a
commit 7db7024cb3

View File

@@ -190,7 +190,7 @@ const handleMissingInformation = async ({github, context, labels}) => {
label.startsWith('missing-'), label.startsWith('missing-'),
); );
const outdatedVersionLabel = labels.find((label) => const outdatedVersionLabel = Array.from(labels).find((label) =>
label.startsWith('outdated-version'), label.startsWith('outdated-version'),
); );
@@ -220,7 +220,9 @@ const updateLabelsForMissingInfo = (labels) => {
labels.add('Repro Provided'); 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'); labels.add('Newer Version Available');
} else { } else {
labels.delete('Newer Version Available'); labels.delete('Newer Version Available');