Reworked the response again.
All checks were successful
Lint / pre-commit Linting (push) Successful in 26s
All checks were successful
Lint / pre-commit Linting (push) Successful in 26s
This commit is contained in:
parent
804a96901a
commit
6b56c9c937
5
index.js
5
index.js
@ -118,11 +118,12 @@ async function postCode() {
|
|||||||
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 {
|
||||||
|
let response;
|
||||||
core.info(`Logging into as user ${username}`);
|
core.info(`Logging into as user ${username}`);
|
||||||
response = await Promise.resolve()
|
response = await Promise.resolve()
|
||||||
.then(() => api.auth(username, password, login_arguments))
|
.then(() => api.auth(username, password, login_arguments))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
core.info(JSON.stringify(api.code.set(branch, files_to_push), null, 2));
|
response = api.code.set(branch, files_to_push);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(`Code set successfully to ${branch}`);
|
console.log(`Code set successfully to ${branch}`);
|
||||||
@ -130,7 +131,7 @@ async function postCode() {
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error("Error:", err);
|
console.error("Error:", err);
|
||||||
});
|
});
|
||||||
core.info("Authorized!");
|
core.info(JSON.stringify(response));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user