From ad5a6efa149e1fdae91b85aeb93c97684ab627f3 Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Sun, 26 Nov 2023 21:30:27 +0100 Subject: [PATCH] Commented out a log. --- .pre-commit-config.yaml | 5 ----- index.js | 40 ++++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 83e1796..83cdbd3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,8 +49,3 @@ repos: hooks: - id: prettier types_or: [css, javascript] - -- repo: https://github.com/pre-commit/mirrors-jshint - rev: v2.13.6 # Use the sha / tag you want to point at - hooks: - - id: jshint diff --git a/index.js b/index.js index 0e0cb44..1e82cc1 100644 --- a/index.js +++ b/index.js @@ -114,26 +114,26 @@ async function postCode() { return; } let api = new ScreepsAPI(login_arguments); - if (token) { - const response = await api.code.set(branch, files_to_push); - core.info(JSON.stringify(response, null, 2)); - } else { - core.info(`Logging into as user ${username}`); - const response = Promise.resolve() - .then(() => api.auth(username, password)) - .then(() => { - return api.code.set(branch, code); // Set the code on the specified branch - }) - .then(() => { - console.log("Code set successfully"); - // Additional actions after setting the code, if necessary - }) - .catch((err) => { - console.error("Error:", err); - }); - core.info("Authorized!"); - core.info(JSON.stringify(response, null, 2)); - } + // if (token) { + const response = await api.code.set(branch, files_to_push); + core.info(JSON.stringify(response, null, 2)); + //} else { + //core.info(`Logging into as user ${username}`); + //const response = Promise.resolve() + // .then(() => api.auth(username, password)) + // .then(() => { + // return api.code.set(branch, code); // Set the code on the specified branch + // }) + // .then(() => { + // console.log("Code set successfully"); + // // Additional actions after setting the code, if necessary + // }) + // .catch((err) => { + // console.error("Error:", err); + // }); + // core.info("Authorized!"); + // core.info(JSON.stringify(response, null, 2)); + // } } postCode();