gh label list
gh label list [flags]
显示 GitHub 存储库中的标签。
使用 --search 标志时,结果按查询的最佳匹配排序。此行为无法使用 --order 或 --sort 标志配置。
选项
-q,--jq <expression>- 使用 jq 表达式过滤 JSON 输出
-
--json <fields> - 使用指定的字段输出 JSON
-L,--limit <int> (默认 30)- 要获取的最大标签数
-
--order <string> (默认 "asc") - 返回的标签顺序:{asc|desc}
-S,--search <string>- 搜索标签名称和描述
-
--sort <string> (默认 "created") - 对获取的标签进行排序:{created|name}
-t,--template <string>- 使用 Go 模板格式化 JSON 输出;请参阅“gh help formatting”
-w,--web- 在 Web 浏览器中列出标签
从父命令继承的选项
-R,--repo <[HOST/]OWNER/REPO>- 使用 [HOST/]OWNER/REPO 格式选择另一个存储库
别名
gh label ls
JSON 字段
color, createdAt, description, id, isDefault, name, updatedAt, url
示例
# sort labels by name
$ gh label list --sort name
# find labels with "bug" in the name or description
$ gh label list --search bug