Changed a docstring and added an await.
All checks were successful
Lint / pre-commit Linting (push) Successful in 25s
All checks were successful
Lint / pre-commit Linting (push) Successful in 25s
This commit is contained in:
parent
6b56c9c937
commit
5fc053cd76
5
index.js
5
index.js
@ -117,9 +117,10 @@ async function postCode() {
|
||||
if (token) {
|
||||
const response = await api.code.set(branch, files_to_push);
|
||||
core.info(JSON.stringify(response, null, 2));
|
||||
console.log(`Code set successfully to ${branch}`);
|
||||
} else {
|
||||
let response;
|
||||
core.info(`Logging into as user ${username}`);
|
||||
core.info(`Logging in as user ${username}`);
|
||||
response = await Promise.resolve()
|
||||
.then(() => api.auth(username, password, login_arguments))
|
||||
.then(() => {
|
||||
@ -131,7 +132,7 @@ async function postCode() {
|
||||
.catch((err) => {
|
||||
console.error("Error:", err);
|
||||
});
|
||||
core.info(JSON.stringify(response));
|
||||
core.info(JSON.stringify(await response));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user