> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runaether.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the changed files of the task's published pull request at a pinned commit

> The same live GitHub file listing getPRReviewDiff serves, for the task's published pull request instead of a reviewed one: patch is absent when GitHub provides none (binary or oversized files), and truncated is true at GitHub's 3000-file cap. Nothing is cached or persisted. head_sha pins the answer to one commit — the diff is served only while that commit is still the pull request's head, and a head that has moved is a 409 rather than the diff of a different commit. 404 covers a task that is not the caller's and one with no published pull request.



## OpenAPI

````yaml api-reference/openapi.v1.json GET /tasks/{taskID}/github/pr/diff
openapi: 3.1.0
info:
  title: Aether Public API
  version: 0.1.0
  description: >-
    The versioned, public Aether REST API. Authenticate with an `aether_`
    platform API key or a session token.
servers:
  - url: https://api.runaether.dev/v1
security:
  - bearerAuth: []
paths:
  /tasks/{taskID}/github/pr/diff:
    get:
      tags:
        - tasks
      summary: >-
        Get the changed files of the task's published pull request at a pinned
        commit
      description: >-
        The same live GitHub file listing getPRReviewDiff serves, for the task's
        published pull request instead of a reviewed one: patch is absent when
        GitHub provides none (binary or oversized files), and truncated is true
        at GitHub's 3000-file cap. Nothing is cached or persisted. head_sha pins
        the answer to one commit — the diff is served only while that commit is
        still the pull request's head, and a head that has moved is a 409 rather
        than the diff of a different commit. 404 covers a task that is not the
        caller's and one with no published pull request.
      operationId: getTaskGithubPullRequestDiff
      parameters:
        - in: path
          name: taskID
          required: true
          schema:
            type: string
        - explode: false
          in: query
          name: head_sha
          required: true
          schema:
            maxLength: 40
            minLength: 40
            pattern: ^[0-9a-f]{40}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  files:
                    items:
                      $ref: '#/components/schemas/PRReviewDiffFile'
                    type: array
                  total_files:
                    format: int64
                    minimum: 0
                    type: integer
                  truncated:
                    type: boolean
                required:
                  - files
                  - total_files
                  - truncated
                type: object
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
components:
  schemas:
    PRReviewDiffFile:
      additionalProperties: false
      properties:
        additions:
          format: int64
          minimum: 0
          type: integer
        deletions:
          format: int64
          minimum: 0
          type: integer
        patch:
          type: string
        path:
          type: string
        previous_path:
          type: string
        status:
          $ref: '#/components/schemas/PRReviewDiffFileStatus'
      required:
        - path
        - status
        - additions
        - deletions
      type: object
    ErrorResponse:
      additionalProperties: false
      properties:
        code:
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
      type: object
    PRReviewDiffFileStatus:
      enum:
        - added
        - removed
        - modified
        - renamed
        - copied
        - changed
        - unchanged
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````