gh issue list
gh issue list [flags]
列出 GitHub 存储库中的问题。
搜索查询语法在此处记录:https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
选项
-
--app <string> - 按 GitHub App 作者筛选
-a,--assignee <string>- 按受让人筛选
-A,--author <string>- 按作者筛选
-q,--jq <expression>- 使用 jq 表达式过滤 JSON 输出
-
--json <fields> - 使用指定字段输出 JSON
-l,--label <strings>- 按标签筛选
-L,--limit <int> (default 30)- 要获取的最大问题数
-
--mention <string> - 按提及筛选
-m,--milestone <string>- 按里程碑编号或标题筛选
-S,--search <query>- 使用查询搜索问题
-s,--state <string> (default "open")- 按状态筛选:{open|closed|all}
-t,--template <string>- 使用 Go 模板格式化 JSON 输出;请参见“gh help formatting”
-w,--web- 在 Web 浏览器中列出问题
从父命令继承的选项
-R,--repo <[HOST/]OWNER/REPO>- 使用 [HOST/]OWNER/REPO 格式选择另一个存储库
别名
gh issue ls
JSON 字段
assignees, author, body, closed, closedAt, comments, createdAt, id, isPinned, labels, milestone, number, projectCards, projectItems, reactionGroups, state, stateReason, title, updatedAt, url
示例
$ gh issue list --label "bug" --label "help wanted"
$ gh issue list --author monalisa
$ gh issue list --assignee "@me"
$ gh issue list --milestone "The big 1.0"
$ gh issue list --search "error no:assignee sort:created-asc"另请参见
正在使用中
默认行为
您将看到最新的 30 个打开的项目。
# Viewing a list of open issues
~/Projects/my-project$ gh issue list
Issues for owner/repo
#14 Update the remote url if it changed (bug)
#14 PR commands on a detached head (enhancement)
#13 Support for GitHub Enterprise (wontfix)
#8 Add an easier upgrade command (bug)
~/Projects/my-project$
使用标志进行筛选
您可以使用标志筛选列表以满足您的特定用例。
# Viewing a list of closed issues assigned to a user
~/Projects/my-project$ gh issue list --state closed --assignee user
Issues for owner/repo
#13 Enable discarding submodule changes (bug)
#8 Upgrade to latest react (upgrade)
~/Projects/my-project$