gh project field-create
在项目中创建字段
gh project field-create [<number>] [flags]
选项
-
--data-type <string>
- 新字段的数据类型:{TEXT|SINGLE_SELECT|DATE|NUMBER}
-
--format <string>
- 输出格式:{json}
-q
,--jq <expression>
- 使用 jq 表达式过滤 JSON 输出
-
--name <string>
- 新字段的名称
-
--owner <string>
- 所有者的登录名。对当前用户使用“@me”。
-
--single-select-options <strings>
- SINGLE_SELECT 数据类型的选项
-t
,--template <string>
- 使用 Go 模板格式化 JSON 输出;请参阅“gh help formatting”
示例
# create a field in the current user's project "1"
gh project field-create 1 --owner "@me" --name "new field" --data-type "text"
# create a field with three options to select from for owner monalisa
gh project field-create 1 --owner monalisa --name "new field" --data-type "SINGLE_SELECT" --single-select-options "one,two,three"