This commit is contained in:
parent
b0725e8219
commit
ad5a6efa14
@ -49,8 +49,3 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
types_or: [css, javascript]
|
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
|
|
||||||
|
40
index.js
40
index.js
@ -114,26 +114,26 @@ async function postCode() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let api = new ScreepsAPI(login_arguments);
|
let api = new ScreepsAPI(login_arguments);
|
||||||
if (token) {
|
// if (token) {
|
||||||
const response = await api.code.set(branch, files_to_push);
|
const response = await api.code.set(branch, files_to_push);
|
||||||
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}`);
|
||||||
const response = Promise.resolve()
|
//const response = Promise.resolve()
|
||||||
.then(() => api.auth(username, password))
|
// .then(() => api.auth(username, password))
|
||||||
.then(() => {
|
// .then(() => {
|
||||||
return api.code.set(branch, code); // Set the code on the specified branch
|
// return api.code.set(branch, code); // Set the code on the specified branch
|
||||||
})
|
// })
|
||||||
.then(() => {
|
// .then(() => {
|
||||||
console.log("Code set successfully");
|
// console.log("Code set successfully");
|
||||||
// Additional actions after setting the code, if necessary
|
// // Additional actions after setting the code, if necessary
|
||||||
})
|
// })
|
||||||
.catch((err) => {
|
// .catch((err) => {
|
||||||
console.error("Error:", err);
|
// console.error("Error:", err);
|
||||||
});
|
// });
|
||||||
core.info("Authorized!");
|
// core.info("Authorized!");
|
||||||
core.info(JSON.stringify(response, null, 2));
|
// core.info(JSON.stringify(response, null, 2));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
postCode();
|
postCode();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user