Skip to content

Allow calculated values in patterns based on question answers #19

@coordt

Description

@coordt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions