felangel / felangel/mason

feat: Limiting var values

オープン
#849 コメント 3 件 リアクション 0 件 担当者 1 名 @felangel が担当を希望しています GitHub で見る
documentation
主要言語
Dart
スター
1.1k
フォーク
113
PR マージ指標
30日以内にマージされた PR はありません

説明

**Description**

Have a way to limit the responses of values for the variable.

**Requirements**

- [ ] Include new parameter to vars called `values`.
- [ ] Fail if user inputs a value not included in the limited answer.

**Additional Context**

I might want to restrict the values set in a variable defined in the `brick.yaml` to be one of the values of an array.
Example:

```yaml
vars:
name:
type: string
values: ['Max', 'Charlie', 'Cooper'] # The possible answers.
description: Pick one of the valid names for your dog
default: Max
prompt: What is the name of your dog? # Show the default value and possible values grey out.
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。