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

# How a pull request on a connected repo stands

> `state` says whether it's open, closed or merged. For a member of the project's org who can push to its GitHub repo, as they are on GitHub. 403 `github_not_linked` without a connected GitHub account, `github_no_push` without push on the repo, and `github_no_access` when Patch's GitHub App can't reach it, or hasn't got what this needs, with where to accept that in `details.settings_url`; 404 `gone_from_github`.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{owner}/{slug}/github/pulls/{number}
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /projects/{owner}/{slug}/github/pulls/{number}:
    get:
      tags:
        - GitHub
      summary: How a pull request on a connected repo stands
      description: >-
        `state` says whether it's open, closed or merged. For a member of the
        project's org who can push to its GitHub repo, as they are on GitHub.
        403 `github_not_linked` without a connected GitHub account,
        `github_no_push` without push on the repo, and `github_no_access` when
        Patch's GitHub App can't reach it, or hasn't got what this needs, with
        where to accept that in `details.settings_url`; 404 `gone_from_github`.
      parameters:
        - schema:
            type: string
            example: patch
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: demo-mod
          required: true
          name: slug
          in: path
        - schema:
            type: integer
            exclusiveMinimum: 0
            example: 12
          required: true
          name: number
          in: path
      responses:
        '200':
          description: How it stands
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubPull'
        '308':
          description: Renamed; follow the Location header
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '`not_connected`: the project''s repo isn''t on GitHub'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many requests: wait as long as `Retry-After` says
            (`retry_after_s` in `details`), then retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: '`github_unavailable`: GitHub didn''t answer'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    GithubPull:
      type: object
      properties:
        number:
          type: integer
          example: 12
        url:
          type: string
          format: uri
          description: Its page on GitHub
        title:
          type: string
        head:
          type: string
          example: sky-boost
          description: The branch it's from
        base:
          type: string
          example: main
          description: The branch it goes into
        state:
          type: string
          enum:
            - open
            - closed
            - merged
        merged_at:
          type:
            - string
            - 'null'
          description: When it merged, or null
        mergeable:
          type:
            - boolean
            - 'null'
          description: >-
            Whether it can merge as it stands, or null while GitHub works that
            out
      required:
        - number
        - url
        - title
        - head
        - base
        - state
        - merged_at
        - mergeable
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key (pch_...) or the token from pch login.

````

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