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

# The GitHub repo that's a project's repo

> Its GitHub id, name, default branch, head and where it stands (`state`): `connected`, `disconnected`, `gone` (deleted from GitHub), `suspended` or `no_access` (the app no longer reaches it). Its org sees it in any state; anyone else who can find the project sees a connected repo that's public on GitHub. 404 for a project that's never been connected.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{owner}/{slug}/repo/github
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}/repo/github:
    get:
      tags:
        - GitHub
      summary: The GitHub repo that's a project's repo
      description: >-
        Its GitHub id, name, default branch, head and where it stands (`state`):
        `connected`, `disconnected`, `gone` (deleted from GitHub), `suspended`
        or `no_access` (the app no longer reaches it). Its org sees it in any
        state; anyone else who can find the project sees a connected repo that's
        public on GitHub. 404 for a project that's never been connected.
      parameters:
        - schema:
            type: string
            example: patch
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: demo-mod
          required: true
          name: slug
          in: path
      responses:
        '200':
          description: Its GitHub repo
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubRepo'
        '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'
components:
  schemas:
    GithubRepo:
      type: object
      properties:
        repo_id:
          type: integer
          description: GitHub's id for it, which renames keep
        full_name:
          type: string
          example: sam/sky-mod
        html_url:
          type: string
          format: uri
          example: https://github.com/sam/sky-mod
        default_branch:
          type: string
          example: main
        private:
          type: boolean
          description: Whether it's private on GitHub
        head_commit:
          type:
            - string
            - 'null'
          description: The default branch's latest commit, as of GitHub's last push event
        pushed_at:
          type:
            - string
            - 'null'
          format: date-time
        state:
          type: string
          enum:
            - connected
            - disconnected
            - gone
            - suspended
            - no_access
          description: >-
            connected. disconnected: someone disconnected it on Patch, or it
            moved to an account without Patch's GitHub App. gone: deleted from
            GitHub. suspended: the app is suspended on its account. no_access:
            the app no longer reaches it (uninstalled, or the repo was taken out
            of the installation).
      required:
        - repo_id
        - full_name
        - html_url
        - default_branch
        - private
        - head_commit
        - pushed_at
        - state
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error

````

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