Added an local rebuilding.
Lint / pre-commit Linting (push) Successful in 45s Details

This commit is contained in:
Philipp Horstenkamp 2023-11-26 19:54:59 +01:00
parent 6f5729c12a
commit 0537c5a914
Signed by: Philipp
GPG Key ID: DD53EAC36AFB61B4
1 changed files with 6 additions and 4 deletions

View File

@ -98,8 +98,6 @@ async function postCode() {
const login_arguments = {
token: token,
username: username,
password: password,
protocol: protocol,
hostname: hostname,
port: port,
@ -116,8 +114,12 @@ async function postCode() {
core.error(errorMessage);
return;
}
const api = new ScreepsAPI(login_arguments);
let api;
if (token) {
api = new ScreepsAPI(login_arguments);
} else {
api = new ScreepsAPI(username, password, login_arguments);
}
const response = await api.code.set(branch, files_to_push);
core.info(JSON.stringify(response, null, 2));
}