From 6f6071e0effb2ffe43495745cf66e2740cbabcf3 Mon Sep 17 00:00:00 2001 From: slugb0t Date: Mon, 12 Aug 2024 14:10:31 -0700 Subject: [PATCH] chore: :hammer: removed unnecessary logs --- bot/index.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/bot/index.js b/bot/index.js index ca289beb..f233e6b8 100644 --- a/bot/index.js +++ b/bot/index.js @@ -100,11 +100,7 @@ export default async (app, { getRouter }) => { repository.name, ); const cwl = await getCWLFiles(context, owner, repository.name); - if (cwl.length > 0) { - consola.success("CWL files found in the repository"); - } else { - consola.info("No CWL files found in the repository"); - } + const cwlObject = { contains_cwl: cwl.length > 0 || false, files: cwl, @@ -127,6 +123,10 @@ export default async (app, { getRouter }) => { license, }; + if (cwl.length > 0) { + consola.success("CWL files found in the repository"); + } + // Create issue body template const issueBody = await renderIssues( context, @@ -272,12 +272,6 @@ export default async (app, { getRouter }) => { cwl = await getCWLFiles(context, owner, repository.name); } - if (cwl.length > 0) { - consola.success("CWL files found in the repository"); - } else { - consola.info("No CWL files found in the repository"); - } - // Check if any of the commits added a LICENSE, CITATION, or codemeta file const gatheredCWLFiles = []; const removedCWLFiles = []; @@ -354,6 +348,10 @@ export default async (app, { getRouter }) => { } } + if (cwl.length > 0) { + consola.success("CWL files found in the repository"); + } + const cwlObject = { contains_cwl: cwl.length > 0 || false, files: cwl, @@ -456,6 +454,10 @@ export default async (app, { getRouter }) => { cwlObject.contains_cwl = cwlExists.contains_cwl_files; } + if (cwl.length > 0) { + consola.success("CWL files found in the repository"); + } + const subjects = { citation, codemeta, @@ -529,8 +531,6 @@ export default async (app, { getRouter }) => { const cwl = await getCWLFiles(context, owner, repository.name); if (cwl.length > 0) { consola.success("CWL files found in the repository"); - } else { - consola.info("No CWL files found in the repository"); } // Remove the section from the issue body starting from ## CWL Validations @@ -630,9 +630,8 @@ export default async (app, { getRouter }) => { if (cwl.length > 0) { consola.success("CWL files found in the repository"); - } else { - consola.info("No CWL files found in the repository"); } + const cwlObject = { contains_cwl: cwl.length > 0 || false, files: cwl,