From 31012317e11d272a5ad4c09f7c0a9e3b6a00a028 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Wed, 18 Sep 2024 15:43:57 +1000 Subject: [PATCH] fix up debugging --- .github/workflows/virusTotalAnalysis.js | 2 +- .github/workflows/virusTotalSubmit.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/virusTotalAnalysis.js b/.github/workflows/virusTotalAnalysis.js index da25ea093aa..ecef88a9321 100644 --- a/.github/workflows/virusTotalAnalysis.js +++ b/.github/workflows/virusTotalAnalysis.js @@ -62,7 +62,7 @@ function getVirusTotalAnalysisIfRequired({core}, metadataFile) { core.info('VirusTotal analysis skipped, already performed'); return; } - if (apiUsageCount >= 10) { + if (core._apiUsageCount >= 10) { core.info('VirusTotal API usage limit reached'); throw new Error('VirusTotal API usage limit reached'); } diff --git a/.github/workflows/virusTotalSubmit.js b/.github/workflows/virusTotalSubmit.js index 0b2717069a4..7d398ace446 100644 --- a/.github/workflows/virusTotalSubmit.js +++ b/.github/workflows/virusTotalSubmit.js @@ -58,16 +58,16 @@ function submitAddonIfNotScanned({core}, metadataFile) { countAPIUsageAndWait({core}); // Check if file has been scanned before exec(`vt file ${sha256} -k ${process.env.VT_API_KEY} --format json`, (err, stdout, stderr) => { - console.debug(`stdout: ${stdout}`); - console.debug(`stderr: ${stderr}`); - console.debug(`err: ${err}`); + core.debug(`stdout: ${stdout}`); + core.debug(`stderr: ${stderr}`); + core.debug(`err: ${err}`); try { const vtData = JSON.parse(stdout); - console.debug(`Add-on file ${metadataFile} already submitted, results: ${vtData}`); + core.debug(`Add-on file ${metadataFile} already submitted, results: ${vtData}`); return; } catch (e) { - console.debug(`Add-on file ${metadataFile} has not been scanned before`); - // File has not been scanned before, + core.debug(`Add-on file ${metadataFile} has not been scanned before`); + // File has not been scanned before, // download and submit add-on file downloadAndSubmitAddon({core}, addonMetadata); }