From 2cbe0835da662176fa9023c3d258feb647287438 Mon Sep 17 00:00:00 2001 From: Renato Vicente Date: Tue, 31 Oct 2023 16:06:48 +0000 Subject: [PATCH] fix: checking body before continue --- lib/functions.js | 15 +++++++++++---- lib/main.js | 9 +++++++-- src/main.ts | 9 +++++++-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/lib/functions.js b/lib/functions.js index a4a8682..fc1b28d 100644 --- a/lib/functions.js +++ b/lib/functions.js @@ -33,11 +33,9 @@ const compareLabels = (labels) => { synonymsObject[synonym.toLowerCase()] = label; }); } - console.log(synonymsObject); const hasLabels = (line) => { const selectedLabels = line.match(labelsRegex) || []; return selectedLabels.map(elem => { - console.log('aqui', elem); return (synonymsObject[elem.toLowerCase()] || labels.find(label => label.toLowerCase() === elem.toLowerCase()) || elem); @@ -58,18 +56,27 @@ const compareLabels = (labels) => { } }; exports.compareLabels = compareLabels; +const parseAutoLabel = (body) => { + const autoLabelRegex = new RegExp(/(?