返回 Skill 列表
extension
分类: 开发与工程无需 API Key

gh-listing-issues

列出GitHub问题,并可选择性过滤。当您需要浏览存储库中的开放、关闭或特定标签的问题时使用。

person作者: jakexiaohubgithub

Listing GitHub Issues

Purpose

Provides a standard way to retrieve a list of issues from a repository using the gh issue list command.

1. Safety & Verification

  • Repository Context: Ensure you are in a git repository or use the -R owner/repo flag.
  • JSON Output: Always prefer --json for structured data.

2. Common Workflows

Workflow: List Open Issues

Retrieves the most recent open issues with relevant metadata.

Command:

gh issue list --state open --json number,title,labels,updatedAt

Workflow: Filter by Label

Lists issues that have specific labels.

Command:

gh issue list --label "bug,help wanted" --json number,title,state

Workflow: Advanced Search for Sub-issues

Filters issues based on their hierarchical status.

Command:

# List all issues that have sub-issues
gh issue list --search "has:sub-issue" --json number,title

# List all issues that do NOT have a parent (top-level issues)
gh issue list --search "no:parent-issue" --json number,title

3. Output Handling

Use jq to extract specific values if needed for further automation.

Example:

gh issue list --state open --json number --jq '.[].number'