From 4b9fb45060225c9590fc4f07e2863af16db07ac4 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 14 Jun 2025 18:47:45 +0200 Subject: [PATCH] workflows/labels: fix approval label with maintainers This currently fails with: ``` Method Set.prototype.has called on incompatible receiver undefined ``` Seems like my syntax test previously only hit the case without maintainers, in which case it doesn't throw :/. --- .github/workflows/labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index d29df9002b449..a7e34775d6eaa 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -113,7 +113,7 @@ jobs: // And the labels that should be there const after = JSON.parse(await readFile('comparison/changed-paths.json', 'utf-8')).labels if (approvals.size > 0) after.push(`12.approvals: ${approvals.size > 2 ? '3+' : approvals.size}`) - if (Array.from(maintainers).some(approvals.has)) after.push('12.approved-by: package-maintainer') + if (Array.from(maintainers).some(m => approvals.has(m))) after.push('12.approved-by: package-maintainer') // Remove the ones not needed anymore await Promise.all(