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

Allow calculated values in patterns based on question answers #19

Open
coordt opened this issue Jan 4, 2025 · 0 comments
Open

Allow calculated values in patterns based on question answers #19

coordt opened this issue Jan 4, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@coordt
Copy link
Member

coordt commented Jan 4, 2025

Is your feature request related to a problem? Please describe.

For example, in choosing a license, the pattern might provide the initial choice, but then will want to add additional data based on that choice, like "SPDX", and "license_text".

Describe the solution you'd like.

Provide an additional_context attribute to the Choice

[[questions]]
name = "license"
prompt = "Under what license is this code published?"
type = "str"
choices = [
    { label = "2-Clause BSD License", value = "_bsd-2.jinja", additional_context = [{ spdx = "BSD-2-Clause" }] },
]

Describe alternatives you've considered

No response

Additional context

No response

@coordt coordt added the enhancement New feature or request label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant