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

gh-viewing-issue-details

检索特定GitHub问题的详细信息。当您需要阅读问题的内容、评论或标签时使用。

person作者: jakexiaohubgithub

Viewing Issue Details

Purpose

Provides full context for a single GitHub issue using the gh issue view command.

1. Safety & Verification

  • Issue Number: Requires a valid issue number or URL.
  • JSON Fields: Use --json to specify which fields to retrieve.

2. Common Workflows

Workflow: Get Full Issue Context

Retrieves title, body, and comments.

Command:

gh issue view <issue-number> --comments --json number,title,body,comments,labels,state

Workflow: Read Latest Comment

Useful for tracking recent activity.

Command:

gh issue view <issue-number> --json comments --jq '.comments[-1].body'

Workflow: Check Hierarchical Context (Sub-issues)

Identifies if an issue is a sub-issue or has sub-issues of its own.

Command:

# 1. Check if the issue has a parent
gh api /repos/{owner}/{repo}/issues/{issue_number}/parent

# 2. List all sub-issues (children)
gh api /repos/{owner}/{repo}/issues/{issue_number}/sub_issues

3. Output Handling

The output is optimized for agent consumption via JSON.