capability_id: pr.checks.list
version: "1.0.0"
description: List pull request check statuses with summary counts.
input_schema:
  type: object
  required: [owner, name, prNumber]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    prNumber: { type: integer, minimum: 1 }
    state: { type: string, enum: [failed, pending, passed] }
  additionalProperties: false
output_schema:
  type: object
  required: [items, summary]
  properties:
    items:
      type: array
      items:
        type: object
        required: [name, state, workflow, link, annotations]
        properties:
          name: { type: [string, "null"] }
          state: { type: [string, "null"] }
          workflow: { type: [string, "null"] }
          link: { type: [string, "null"] }
          annotations:
            type: array
            items:
              type: object
              required: [path, startLine, endLine, level, message]
              properties:
                path: { type: [string, "null"] }
                startLine: { type: [integer, "null"] }
                endLine: { type: [integer, "null"] }
                level: { type: [string, "null"] }
                message: { type: [string, "null"] }
              additionalProperties: false
        additionalProperties: false
    summary:
      type: object
      required: [total, failed, pending, passed]
      properties:
        total: { type: integer, minimum: 0 }
        failed: { type: integer, minimum: 0 }
        pending: { type: integer, minimum: 0 }
        passed: { type: integer, minimum: 0 }
      additionalProperties: false
  additionalProperties: false
routing:
  preferred: cli
  fallbacks: []
cli:
  command: pr checks
  jsonFields: [name, state, workflow, link]
