• Creates or updates a GitHub Gist with the provided snippet details. If the update parameter is provided and true, the snippet is updated; otherwise, a new snippet is created.

    Parameters

    • name: string

      The name of the snippet.

    • text: string

      The content of the snippet.

    • description: string

      The description for the snippet.

    • visibility: string

      The visibility of the snippet, either "Public" or "Private".

    • Optionalupdate: boolean

      Optional flag indicating whether to update an existing snippet (default is undefined).

    Returns Promise<any>

    The Gist ID of the created or updated snippet.