From 804a96901a00d3976a8050a8bdca5c74030aea6d Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Sun, 26 Nov 2023 22:04:51 +0100 Subject: [PATCH] Reworked the response parsing. --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index f162441..fa38cd4 100644 --- a/index.js +++ b/index.js @@ -119,10 +119,10 @@ async function postCode() { core.info(JSON.stringify(response, null, 2)); } else { core.info(`Logging into as user ${username}`); - const response = await Promise.resolve() + response = await Promise.resolve() .then(() => api.auth(username, password, login_arguments)) .then(() => { - return api.code.set(branch, files_to_push); + core.info(JSON.stringify(api.code.set(branch, files_to_push), null, 2)); }) .then(() => { console.log(`Code set successfully to ${branch}`); @@ -130,7 +130,6 @@ async function postCode() { .catch((err) => { console.error("Error:", err); }); - core.info(JSON.stringify(response, null, 2)); core.info("Authorized!"); } }