> ## 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 repos of one of the app's installations that you can reach

> Read from GitHub with your own token, page by page, newest push first, and reused for a minute. `fresh=true` reads it again, as Projects' sheet asks after `add a repo`, at most once every 5 s for you: an ask in between shares a fresh read of the same list still on its way, or gets the list as an ask without `fresh` would. `q` keeps the ones whose name has it. `role` is yours on each, and `connected` says which project a repo is connected to already. 403 `github_not_linked` until Patch knows your GitHub account, 404 for an installation GitHub doesn't list for you.



## OpenAPI

````yaml /api-reference/openapi.json get /me/github/repos
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:
  /me/github/repos:
    get:
      tags:
        - GitHub
      summary: The repos of one of the app's installations that you can reach
      description: >-
        Read from GitHub with your own token, page by page, newest push first,
        and reused for a minute. `fresh=true` reads it again, as Projects' sheet
        asks after `add a repo`, at most once every 5 s for you: an ask in
        between shares a fresh read of the same list still on its way, or gets
        the list as an ask without `fresh` would. `q` keeps the ones whose name
        has it. `role` is yours on each, and `connected` says which project a
        repo is connected to already. 403 `github_not_linked` until Patch knows
        your GitHub account, 404 for an installation GitHub doesn't list for
        you.
      parameters:
        - schema:
            type: integer
            exclusiveMinimum: 0
          required: true
          name: installation
          in: query
        - schema:
            type: string
            maxLength: 200
          required: false
          name: q
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            description: >-
              `true`: read from GitHub just now, not reused. At most once every
              5 s for you; in between, a fresh read still on its way, or the
              list as without it
          required: false
          description: >-
            `true`: read from GitHub just now, not reused. At most once every 5
            s for you; in between, a fresh read still on its way, or the list as
            without it
          name: fresh
          in: query
      responses:
        '200':
          description: The repos
          content:
            application/json:
              schema:
                type: object
                properties:
                  repos:
                    type: array
                    items:
                      $ref: '#/components/schemas/GithubRepoChoice'
                required:
                  - repos
        '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'
        '502':
          description: GitHub didn't answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    GithubRepoChoice:
      type: object
      properties:
        id:
          type: integer
          description: 'GitHub''s id for it: connect it by this'
        full_name:
          type: string
          example: sam/sky-mod
        name:
          type: string
          example: sky-mod
        private:
          type: boolean
        default_branch:
          type: string
        pushed_at:
          type:
            - string
            - 'null'
        role:
          type:
            - string
            - 'null'
          enum:
            - admin
            - maintain
            - write
            - read
            - null
          description: 'Yours on it: connecting takes admin or maintain'
        license:
          type:
            - string
            - 'null'
          description: >-
            Its licence as GitHub reads its LICENSE: an SPDX id, `NOASSERTION`
            for one GitHub can't name, or null for none. Open needs one, until
            the Patch licence is ready.
          example: MIT
        connected:
          type:
            - object
            - 'null'
          properties:
            owner:
              type:
                - string
                - 'null'
            slug:
              type:
                - string
                - 'null'
          required:
            - owner
            - slug
          description: >-
            The project it's connected to, or null. Owner and slug are null for
            a project you can't see.
      required:
        - id
        - full_name
        - name
        - private
        - default_branch
        - pushed_at
        - role
        - license
        - connected
    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.