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