ci/github-script/labels: fix unmaintained packages

The labeler currently breaks for unmaintained packages after the recent
change to use maintainer maps.
This commit is contained in:
Wolfgang Walther
2025-11-01 11:47:45 +01:00
parent 106ea279bd
commit 7b4a437e99

View File

@@ -299,10 +299,10 @@ module.exports = async ({ github, context, core, dry }) => {
'11.by: package-maintainer':
packages.length &&
packages.every((pkg) =>
maintainers[pkg].includes(pull_request.user.id),
maintainers[pkg]?.includes(pull_request.user.id),
),
'12.approved-by: package-maintainer': packages.some((pkg) =>
maintainers[pkg].some((m) => approvals.has(m)),
maintainers[pkg]?.some((m) => approvals.has(m)),
),
})
}