From afc151809c509cb6612d97cd54eee35923a212b6 Mon Sep 17 00:00:00 2001 From: Saahil Date: Fri, 15 Nov 2024 08:23:36 -0500 Subject: [PATCH] Update validate_prs.js --- scripts/validate_prs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/validate_prs.js b/scripts/validate_prs.js index dd4dacf..3d413ad 100644 --- a/scripts/validate_prs.js +++ b/scripts/validate_prs.js @@ -51,7 +51,7 @@ const pull_number = process.env.PR_NUMBER; // TODO: any other props? function validate(obj) { if (!obj.name) throw "No Name"; - if (!obj.os) throw "No OS provided"; + if (!obj.distro) throw "No OS provided"; if (obj.git && typeof obj.git !== "string") throw "git is not a string"; if (typeof obj.name !== "string") throw "Name is not a string"; if (typeof obj.os !== "string") throw "OS is not a string"; @@ -70,14 +70,14 @@ const pull_number = process.env.PR_NUMBER; if (Array.isArray(parsed)) { parsed.forEach((e) => { console.log(`Checking `, e); - // if (already_thrown) return; + if (already_thrown) return; try { console.log(`Validation??`); validate(e); } catch (e) { console.error(e); already_thrown = true; - commentError(e.message); + commentError(e.toString()); } }); } else {