Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Allow the CLI to Skip Prompts #86

Open
megazear7 opened this issue Apr 9, 2020 · 2 comments
Open

Allow the CLI to Skip Prompts #86

megazear7 opened this issue Apr 9, 2020 · 2 comments

Comments

@megazear7
Copy link

The sba command prompts the user to answer various questions. It should be possible to skip these prompts by entering the answers into the cli command. It should also require an argument such as --skip-prompts to be entered. If this argument is entered and all the required prompts are not answered, it should fail telling the user what questions they need to add into the command. This would allow the cli to be used programmatically and could have significant unforeseen benefits.

Below are some examples of what it could look like, but we could work on the syntax. The reason for the quotes is that some of the answers could contain spaces or be lists of answers.

sba story --skip-prompts --which-stories "all" --create-content "yes"
sba story --skip-prompts --which-stories "single" --which-component "button" --initial-stories "Blue Button, Yellow Button" --create-content "no"
@jzeltman
Copy link
Contributor

Could we remove the --skip-prompts?
Also could we instead allow the user to add the flags they want, parse those, and only ask the follow up questions they missed? Instead of it failing out?

@megazear7
Copy link
Author

megazear7 commented Apr 10, 2020

Maybe we could automatically skip the prompts that are answered without requiring the --skip-prompts, and if they were all answered then there are no prompts. I think however it would be good to have a --force-prompts or something that errors out if the correct prompts were not answered so that programatic usage could do proper error handling. @jzeltman thoughts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants