Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: use async await insted of then in deploy #2885

Conversation

Iru89
Copy link
Contributor

@Iru89 Iru89 commented Aug 7, 2024

Description

Refactor the deploy file to always use async await instead of chaining asyncorn functions with callbacks inside the then function.

Context

Approach taken / Explain the design

To document / Usage example

Testing

The pull request...

  • has unit tests
  • has integration tests
  • doesn't need tests because... [provide a description]

Copy link

github-actions bot commented Aug 7, 2024

Test Results

30 tests  ±0   30 ✅ ±0   4m 49s ⏱️ -5s
 6 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit f5ff39f. ± Comparison against base commit 74b4a6c.

♻️ This comment has been updated with latest results.

@Iru89 Iru89 marked this pull request as ready for review August 7, 2024 14:56
@Iru89 Iru89 force-pushed the botonic-cli/refactor-to-use-async-await-in-deploy branch from c5f1881 to a29425a Compare August 8, 2024 15:39
@Iru89 Iru89 force-pushed the botonic-cli/refactor-to-use-async-await-in-deploy branch from a29425a to 9a234c5 Compare August 8, 2024 15:40
const choices = [
'No, I need to create a new one (Signup)',
'Yes, I do. (Login)',
]
return prompt([
const inp = await prompt([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const userInput

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const {signupConfirmation} = await ...

else return this.askSignup()
})
])
if (inp.signupConfirmation == choices[1]) return this.askLogin()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

===

## Description

Use new endpoints /v2/bots/ to deploy.
Send the bot_config as parameters in the POST call /v2/bots/ instead of
adding the json in the separate folder next to the bot zip of the bot to
be deployed.
@Iru89 Iru89 merged commit 5e64f32 into BLT-1008-create-json-with-config-file-on-botonic-deploy Aug 27, 2024
4 of 5 checks passed
@Iru89 Iru89 deleted the botonic-cli/refactor-to-use-async-await-in-deploy branch August 27, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants