> ## 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.

# Resolve a pull request by repository and number

> Resolves a repository and number, as GitHub addresses a pull request, to the PullRequest, read in the org_id the console, review and proof reads take (ranked as getPullRequest ranks it: an organization where the caller holds a product role first), through the repository's GitHub id so a renamed repository still answers, with nothing fetched from GitHub. Any member of an owning organization of the pull request — one whose task published or reviewed it, or with a project on its repository — may call it, a viewer included; reading a connected repository is an org right, so no GitHub connection is needed. Coordinates that name nothing, coordinates two mirrored pull requests answer to, and a pull request no organization of the caller owns answer the same 404.



## OpenAPI

````yaml api-reference/openapi.json GET /repos/{owner}/{repo}/pulls/{number}
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /repos/{owner}/{repo}/pulls/{number}:
    get:
      tags:
        - pull-requests
      summary: Resolve a pull request by repository and number
      description: >-
        Resolves a repository and number, as GitHub addresses a pull request, to
        the PullRequest, read in the org_id the console, review and proof reads
        take (ranked as getPullRequest ranks it: an organization where the
        caller holds a product role first), through the repository's GitHub id
        so a renamed repository still answers, with nothing fetched from GitHub.
        Any member of an owning organization of the pull request — one whose
        task published or reviewed it, or with a project on its repository — may
        call it, a viewer included; reading a connected repository is an org
        right, so no GitHub connection is needed. Coordinates that name nothing,
        coordinates two mirrored pull requests answer to, and a pull request no
        organization of the caller owns answer the same 404.
      operationId: getRepoPullRequest
      parameters:
        - in: path
          name: owner
          required: true
          schema:
            pattern: ^[A-Za-z0-9-]{1,39}$
            type: string
        - in: path
          name: repo
          required: true
          schema:
            pattern: ^[A-Za-z0-9._-]{1,100}$
            type: string
        - in: path
          name: number
          required: true
          schema:
            format: int64
            maximum: 2147483647
            minimum: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequest'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PullRequestsErrorResponse'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Bad Gateway
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Service Unavailable
components:
  schemas:
    PullRequest:
      additionalProperties: false
      properties:
        additions:
          format: int64
          minimum: 0
          type: integer
        author_login:
          minLength: 1
          type: string
        base_branch:
          type: string
        base_sha:
          pattern: ^[0-9a-f]{40}$
          type: string
        checks_failed:
          format: int64
          minimum: 0
          type: integer
        checks_passed:
          format: int64
          minimum: 0
          type: integer
        checks_total:
          format: int64
          minimum: 0
          type: integer
        ci_status:
          $ref: '#/components/schemas/TaskCIStatus'
        comment_count:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        deletions:
          format: int64
          minimum: 0
          type: integer
        dispatch_target:
          $ref: '#/components/schemas/PullRequestDispatchTarget'
        draft:
          type: boolean
        github_updated_at:
          format: date-time
          type: string
        guide_outline:
          items:
            $ref: '#/components/schemas/PRReviewGuideOutlineSection'
          maxItems: 50
          minItems: 1
          type: array
        head_branch:
          type: string
        head_sha:
          type: string
        html_url:
          type: string
        latest_created_at:
          format: date-time
          type: string
        merged_at:
          format: date-time
          type: string
        needs_attention:
          type: boolean
        org_id:
          pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          type: string
        origin_task:
          $ref: '#/components/schemas/PRReviewOriginTask'
        pr_number:
          format: int64
          minimum: 1
          type: integer
        pr_state:
          $ref: '#/components/schemas/TaskGitHubPRState'
        pull_request_id:
          format: uuid
          type: string
        ready_for_merge:
          type: boolean
        repo_name:
          type: string
        repo_owner:
          type: string
        review_runs:
          items:
            $ref: '#/components/schemas/PRReviewRun'
          type: array
        section:
          $ref: '#/components/schemas/PRReviewSection'
        severity_counts:
          $ref: '#/components/schemas/PRReviewSeverityCounts'
        stack_children:
          items:
            $ref: '#/components/schemas/PullRequestStackEdge'
          minItems: 1
          type: array
        stack_parent:
          $ref: '#/components/schemas/PullRequestStackEdge'
        summary_severity:
          $ref: '#/components/schemas/PRReviewSummarySeverity'
        title:
          type: string
        verdict:
          $ref: '#/components/schemas/PRReviewSummaryVerdict'
        viewer_standing:
          $ref: '#/components/schemas/PRReviewViewerStanding'
      required:
        - pull_request_id
        - pr_number
        - title
        - html_url
        - repo_owner
        - repo_name
        - latest_created_at
        - comment_count
        - needs_attention
        - review_runs
        - viewer_standing
        - checks_passed
        - checks_failed
        - checks_total
        - additions
        - deletions
        - draft
        - github_updated_at
        - ready_for_merge
        - org_id
        - section
        - dispatch_target
      type: object
    PullRequestsErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - account_deleting
            - aether_inference_unserved
            - agent_pr_blocked
            - agent_pr_pending
            - agent_profile_changed
            - app_identity_missing
            - attribution_unavailable
            - bad_gateway
            - bad_request
            - caller_inactive
            - conflict
            - connection_harness_mismatch
            - connection_not_held
            - contents_write_required
            - continuation_failed
            - continuation_unavailable
            - control_forbidden
            - embeddings_unavailable
            - fix_not_requested
            - fix_requests_unrecorded
            - forbidden
            - fork_branch_delete_unsupported
            - fork_forbidden
            - gateway_timeout
            - github_failed
            - github_identity_required
            - github_push_access_required
            - gone
            - handed_branch_protected
            - head_moved
            - idempotency_key_conflict
            - idempotency_key_reused
            - inference_proxy_unavailable
            - insufficient_credits
            - insufficient_inference_balance
            - internal_error
            - invalid_request
            - mcp_server_not_connected
            - message_not_queued
            - method_not_allowed
            - mode_forbidden
            - no_dispatch_target
            - not_acceptable
            - not_found
            - not_implemented
            - onboarding_already_completed
            - onboarding_requirements_missing
            - org_id_required
            - org_role_insufficient
            - org_suspended
            - payment_required
            - pr_review_actor_required
            - pr_review_publish_forbidden
            - precondition_failed
            - project_has_no_repository
            - project_required
            - pull_request_closed
            - pull_request_mirror_failed
            - pull_request_not_mirrored
            - queued_stop_requires_discard
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - stack_cycle
            - stack_too_large
            - stack_two_parents
            - stale_execution
            - stale_or_indeterminate
            - stale_pending_input
            - stream_delivery_gap
            - stream_event_conflict
            - task_awaiting_message
            - task_awaiting_tool_response
            - task_connection_disconnected
            - task_creator_deleted
            - task_has_no_repository
            - task_ineligible
            - task_not_accepting_messages
            - task_not_pinnable
            - task_settings_changed
            - teleport_unavailable
            - unauthenticated
            - unsigned_aether_head
            - unsigned_commit
            - unsupported_changes
            - unsupported_media_type
            - untyped_error
            - validation_failed
            - workspace_git_unavailable
            - workspace_rejected
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    TaskCIStatus:
      enum:
        - pending
        - passed
        - failed
      type: string
    PullRequestDispatchTarget:
      enum:
        - author_task
        - review_run
        - none
      type: string
    PRReviewGuideOutlineSection:
      additionalProperties: false
      properties:
        paths:
          items:
            minLength: 1
            pattern: "[^\t-\r \N\_  - \L\P  　\uFEFF]"
            type: string
          maxItems: 20
          type: array
        title:
          maxLength: 200
          minLength: 1
          pattern: "[^\t-\r \N\_  - \L\P  　\uFEFF]"
          type: string
          x-aether-string-length-unit: unicode-code-point
      required:
        - title
        - paths
      type: object
    PRReviewOriginTask:
      additionalProperties: false
      properties:
        id:
          format: uuid
          type: string
        turn_count:
          format: int64
          minimum: 0
          type: integer
      required:
        - id
        - turn_count
      type: object
    TaskGitHubPRState:
      enum:
        - open
        - closed
        - merged
      type: string
    PRReviewRun:
      additionalProperties: false
      properties:
        agent_type:
          $ref: '#/components/schemas/AgentType'
        created_at:
          format: date-time
          type: string
        duration_seconds:
          format: int64
          minimum: 0
          type: integer
        error:
          type: string
        head_sha:
          type: string
        model:
          minLength: 1
          type: string
        run_number:
          format: int64
          minimum: 1
          type: integer
        status:
          $ref: '#/components/schemas/ReviewRunStatus'
        task_id:
          format: uuid
          type: string
        trigger:
          $ref: '#/components/schemas/TaskReviewTrigger'
      required:
        - task_id
        - run_number
        - status
        - created_at
        - agent_type
        - model
      type: object
    PRReviewSection:
      enum:
        - in_review
        - approved
        - other
      type: string
    PRReviewSeverityCounts:
      additionalProperties: false
      properties:
        confirmed:
          format: int64
          minimum: 0
          type: integer
        nit:
          format: int64
          minimum: 0
          type: integer
        p1:
          format: int64
          minimum: 0
          type: integer
        p2:
          format: int64
          minimum: 0
          type: integer
        question:
          format: int64
          minimum: 0
          type: integer
      required:
        - p1
        - p2
        - nit
        - question
        - confirmed
      type: object
    PullRequestStackEdge:
      additionalProperties: false
      description: >-
        One tracked open pull request on a branch-chain edge: as stack_parent,
        the pull request whose head repository and branch match this pull
        request's base; as an element of stack_children, a pull request whose
        base branch is this pull request's head. Present only when the edge
        exists in Aether's tracked pull-request projection; absence does not
        prove the pull request is unstacked.
      properties:
        html_url:
          format: uri
          pattern: ^[hH][tT][tT][pP][sS]?://
          type: string
        pr_number:
          format: int64
          minimum: 1
          type: integer
        pull_request_id:
          format: uuid
          type: string
        state:
          enum:
            - open
          type: string
        title:
          type: string
      required:
        - pull_request_id
        - pr_number
        - title
        - state
        - html_url
      type: object
    PRReviewSummarySeverity:
      enum:
        - p1
        - p2
        - nit
      type: string
    PRReviewSummaryVerdict:
      enum:
        - approve
        - request_changes
        - comment
        - dismissed
        - superseded
      type: string
    PRReviewViewerStanding:
      enum:
        - author
        - pending
        - approved
        - changes_requested
        - commented
        - dismissed
        - none
      type: string
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    AgentType:
      description: >-
        The agent harness that runs a task, a profile or a connection:
        claude-code is Claude Code, codex is Codex, opencode is OpenCode.
      enum:
        - codex
        - claude-code
        - opencode
      type: string
    ReviewRunStatus:
      enum:
        - reviewing
        - completed
        - failed
        - cancelled
        - superseded
        - archived
      type: string
    TaskReviewTrigger:
      enum:
        - automatic
        - comment_command
        - manual
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.