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

Multiple prompts #1861

Closed
MalteMagnussen opened this issue Oct 10, 2024 · 3 comments · Fixed by #1866
Closed

Multiple prompts #1861

MalteMagnussen opened this issue Oct 10, 2024 · 3 comments · Fixed by #1866
Labels
good first issue Issues that are good for first-time contributors to pick up.

Comments

@MalteMagnussen
Copy link

I'd love to be able to give "prompt" an array of prompts.

We have a task that releases to production. Right now we have one prompt that contains multiple questions and checks for the user.

I'd like to split those questions into multiple.

So instead of

version: '3'
tasks:
  deploy:production:
    desc: Release to prod
    prompt: "Do you wish to release to version {{.RELEASE_VERSION}}? Have you remembered to log into harbor today? Have you announced the release on Slack and aligned with team Foo?"

I'd like to do this

version: '3'
tasks:
  deploy:production:
    desc: Release to prod
    prompt:
    - Do you wish to release to version {{.RELEASE_VERSION}}? 
    - Have you remembered to log into harbor today? 
    - Have you announced the release on Slack? 
    - Have you aligned with team Foo? 
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Oct 10, 2024
@andreynering andreynering added type: enhancement good first issue Issues that are good for first-time contributors to pick up. and removed state: needs triage Waiting to be triaged by a maintainer. labels Oct 10, 2024
@mfbmina
Copy link
Contributor

mfbmina commented Oct 16, 2024

@andreynering I want to contribute to this issue! What do you believe is the best way to go?

  1. Prompt can be a single string or multiple values
  2. Prompt for one value and prompts for multiple values?

@andreynering
Copy link
Member

Hi @mfbmina,

Contributions are welcome!

Option 1 would better align with our current conventions. Allow a single string or an array of strings on prompt:.

@mfbmina
Copy link
Contributor

mfbmina commented Oct 16, 2024

Hey @andreynering!

When you're free, could you look at the PR above?

Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are good for first-time contributors to pick up.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants