capability_id: pr.diff.files
version: "1.0.0"
description: List changed files in a pull request diff.
input_schema:
  type: object
  required: [owner, name, prNumber]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    prNumber: { 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: [path, additions, deletions]
        properties:
          path: { type: string, minLength: 1 }
          additions: { type: integer, minimum: 0 }
          deletions: { type: integer, minimum: 0 }
        additionalProperties: false
    pageInfo:
      type: object
      required: [hasNextPage, endCursor]
      properties:
        hasNextPage: { type: boolean }
        endCursor: { type: [string, "null"] }
      additionalProperties: false
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: []
graphql:
  operationName: PrDiffListFiles
  operationType: query
  documentPath: src/gql/operations/pr-diff-list-files.graphql
cli:
  command: pr view
