capability_id: issue.comments.list
version: "1.0.0"
description: List comments for one issue.
input_schema:
  type: object
  required: [owner, name, issueNumber]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    issueNumber: { type: integer, minimum: 1 }
    first: { type: integer, minimum: 1, maximum: 100, default: 30 }
    after: { type: [string, "null"] }
  additionalProperties: false
output_schema:
  type: object
  required: [items, pageInfo]
  properties:
    items:
      type: array
      items:
        type: object
        required: [id, body, authorLogin, url, createdAt]
        properties:
          id: { type: string, minLength: 1 }
          body: { type: string }
          authorLogin: { type: [string, "null"] }
          url: { type: string, minLength: 1 }
          createdAt: { type: string, minLength: 1 }
        additionalProperties: false
    pageInfo:
      type: object
      required: [hasNextPage, endCursor]
      properties:
        hasNextPage: { type: boolean }
        endCursor: { type: [string, "null"] }
      additionalProperties: false
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: [cli]
  notes:
    - Prefer GraphQL for typed issue-comment pagination and stable cursor handling.
    - CLI fallback uses gh api graphql with bounded cursor pagination for comments.
graphql:
  operationName: IssueCommentsList
  operationType: query
  documentPath: src/gql/operations/issue-comments-list.graphql
cli:
  command: api graphql
