Compare commits

3 Commits

Author SHA1 Message Date
2b9a04a136 Changed the dict order again.
All checks were successful
Lint / pre-commit Linting (push) Successful in 25s
2023-11-26 21:54:46 +01:00
3eeeb73e0e Reworked the login arguments again. 2023-11-26 21:54:05 +01:00
7c75b9d000 Reworked a message. 2023-11-26 21:50:25 +01:00

View File

@ -97,12 +97,12 @@ async function postCode() {
const login_arguments = { const login_arguments = {
token: token, token: token,
username: username,
password: password,
protocol: protocol, protocol: protocol,
hostname: hostname, hostname: hostname,
port: port, port: port,
path: path, path: path,
username: "NameVergessen",
password: password,
}; };
core.info("login_arguments:"); core.info("login_arguments:");
@ -119,16 +119,13 @@ async function postCode() {
core.info(JSON.stringify(response, null, 2)); core.info(JSON.stringify(response, null, 2));
} else { } else {
core.info(`Logging into as user ${username}`); core.info(`Logging into as user ${username}`);
// await api.auth(username, password, login_arguments));
// await api.auth(username, password, login_arguments));
const response = Promise.resolve() const response = Promise.resolve()
.then(() => api.auth(username, password, login_arguments)) .then(() => api.auth(username, password, login_arguments))
.then(() => { .then(() => {
return api.code.set(branch, files_to_push); return api.code.set(branch, files_to_push);
}) })
.then(() => { .then(() => {
console.log("Code set successfully"); console.log(`Code set successfully to ${branch}`);
// Additional actions after setting the code, if necessary
}) })
.catch((err) => { .catch((err) => {
console.error("Error:", err); console.error("Error:", err);