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

# Pick up a GitHub repository's new releases by themselves

> Every hour Patch looks at the repository's latest release. A new one becomes a release like the project's newest (the same recipe, pointed at the new files) and goes to review. Send the release files you kept and the tag the newest release came from, as POST /imports/github returned them.



## OpenAPI

````yaml /api-reference/openapi.json put /projects/{owner}/{slug}/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}/github:
    put:
      tags:
        - Releases
      summary: Pick up a GitHub repository's new releases by themselves
      description: >-
        Every hour Patch looks at the repository's latest release. A new one
        becomes a release like the project's newest (the same recipe, pointed at
        the new files) and goes to review. Send the release files you kept and
        the tag the newest release came from, as POST /imports/github returned
        them.
      parameters:
        - schema:
            type: string
            example: patch
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: demo-mod
          required: true
          name: slug
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                repository:
                  type: string
                  minLength: 1
                  maxLength: 500
                files:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
                    minLength: 1
                    maxLength: 500
                  maxItems: 100
                unpack:
                  type: boolean
                tag:
                  type:
                    - string
                    - 'null'
                  maxLength: 200
              required:
                - repository
      responses:
        '200':
          description: Following
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubFollow'
        '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'
      security:
        - bearer: []
components:
  schemas:
    GithubFollow:
      type: object
      properties:
        repository:
          type: string
          example: https://github.com/mira/lantern-run
        files:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            The release files players get, by name with the version left out
            ("LanternRun_v*.zip"); null takes them all.
        unpack:
          type: boolean
          description: 'A browser game: its release''s zip is unpacked'
        released_tag:
          type:
            - string
            - 'null'
          description: >-
            The GitHub release the newest Patch release came from; null when it
            came from the default branch
        checked_at:
          type:
            - string
            - 'null'
        note:
          type:
            - string
            - 'null'
          description: What the last check found
      required:
        - repository
        - files
        - unpack
        - released_tag
        - checked_at
        - note
    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.