Skip to content

Incomplete PR feedback API surface in github-code skill #359

@sentry-junior

Description

@sentry-junior

The github-code skill's api-surface.md only documents 2 of ~8 endpoints needed for complete PR feedback retrieval. This causes the agent to miss inline review comments, review thread state, and conversation comments when inspecting PRs.

Gaps

  • No reviewThreads GraphQL query — REST cannot expose isResolved, isOutdated, or resolvedBy. This is GraphQL-only and completely missing from the surface.
  • No warning that gh pr view --json reviews omits inline review comments--json comments returns conversation comments only, --json reviews returns review summaries only. Inline code review comments require /pulls/{number}/comments or GraphQL reviewThreads/reviews.comments.
  • Missing /issues/{number}/comments — conversation comments live at the issues endpoint, not /pulls/{number}/comments (which is inline review comments only). REST equivalent is undocumented.
  • Missing review-scoped comments endpointGET /pulls/{number}/reviews/{review_id}/comments for walking from a review to its inline comments.
  • Missing direct lookup endpoints — single review comment, single review, single issue comment by ID.
  • Missing pagination guidance — no --paginate documentation; PRs with heavy review activity silently truncate.
  • Missing suggested changes note — suggested changes are embedded in review comment body as markdown suggestion fences, not a separate endpoint.
  • Missing reactions endpoints/pulls/comments/{comment_id}/reactions and /issues/comments/{comment_id}/reactions.

Recommended Fix

Add a "Complete PR Feedback Retrieval" section with:

REST minimum (3 paginated calls):

gh api --paginate repos/{owner}/{repo}/issues/{number}/comments    # conversation comments
gh api --paginate repos/{owner}/{repo}/pulls/{number}/reviews      # review summaries
gh api --paginate repos/{owner}/{repo}/pulls/{number}/comments     # inline review comments

GraphQL for thread state (1 call):

pullRequest(number: N) {
  comments(first: 100) { ... }
  reviews(first: 100) { ... }
  reviewThreads(first: 100) {
    nodes { isResolved isOutdated path line comments(first: 100) { ... } }
  }
}

Add explicit warning about gh pr view --json field limitations.

Full analysis: https://sentry.slack.com/docs/T024ZCV9U/F0B44A567QE

Action taken on behalf of David Cramer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions