From b42b69f1932c306a1e87fed62ab859e34ed1e401 Mon Sep 17 00:00:00 2001 From: ddivad195 Date: Tue, 6 Feb 2024 17:49:12 +0000 Subject: [PATCH] cleanup debug logging --- dist/index.js | 13 +++---------- src/ghcr-client.ts | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/dist/index.js b/dist/index.js index 13f3303..c74a293 100644 --- a/dist/index.js +++ b/dist/index.js @@ -71089,21 +71089,14 @@ async function uploadManifest(manifestJSON, manifestEndpoint, b64Token) { return digestResponseHeader; } const fetchWithDebug = async (url, config = {}) => { - const debugLogs = core.isDebug(); - if (debugLogs) { - core.debug(`Request from ${url} with config: ${JSON.stringify(config)}`); - } + core.debug(`Request from ${url} with config: ${JSON.stringify(config)}`); try { const response = await fetch(url, config); - if (debugLogs) { - core.debug(`Response with ${JSON.stringify(response)}`); - } + core.debug(`Response with ${JSON.stringify(response)}`); return response; } catch (error) { - if (debugLogs) { - core.debug(`Error with ${error}`); - } + core.debug(`Error with ${error}`); throw error; } }; diff --git a/src/ghcr-client.ts b/src/ghcr-client.ts index 0d1c049..f38638e 100644 --- a/src/ghcr-client.ts +++ b/src/ghcr-client.ts @@ -204,20 +204,13 @@ const fetchWithDebug = async ( url: string, config: RequestInit = {} ): Promise => { - const debugLogs = core.isDebug() - if (debugLogs) { - core.debug(`Request from ${url} with config: ${JSON.stringify(config)}`) - } + core.debug(`Request from ${url} with config: ${JSON.stringify(config)}`) try { const response = await fetch(url, config) - if (debugLogs) { - core.debug(`Response with ${JSON.stringify(response)}`) - } + core.debug(`Response with ${JSON.stringify(response)}`) return response } catch (error) { - if (debugLogs) { - core.debug(`Error with ${error}`) - } + core.debug(`Error with ${error}`) throw error } }