Handle pr comments

This commit is contained in:
Sander Declerck 2026-01-14 14:55:11 +01:00
parent 4a53a7b20d
commit cf8e39c5fd
No known key found for this signature in database
2 changed files with 23 additions and 13 deletions

View file

@ -48,13 +48,13 @@ export async function openMalwareDatabase() {
*/
function getPackageStatus(name, version) {
const normalizedName = normalizePackageName(name);
const packageData = malwareDatabase.find((pkg) => {
const normalizedPkgName = normalizePackageName(pkg.package_name);
return (
normalizedPkgName === normalizedName &&
(pkg.version === version || pkg.version === "*")
);
});
const packageData = malwareDatabase.find(
(pkg) => {
const normalizedPkgName = normalizePackageName(pkg.package_name);
return normalizedPkgName === normalizedName &&
(pkg.version === version || pkg.version === "*");
}
);
if (!packageData) {
return MALWARE_STATUS_OK;