Skip to main content

revisions

Creates, updates, deletes, gets or lists a revisions resource.

Overview

Namerevisions
TypeResource
Idgithub.gists.revisions

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idstring
node_idstring
commentsinteger
comments_enabledboolean
comments_urlstring
commits_urlstring
created_atstring
descriptionstring
filesobject
fork_ofobjectGist (title: Gist)
forksarray
forks_urlstring
git_pull_urlstring
git_push_urlstring
historyarray
html_urlstring
ownerobjectA GitHub user. (title: Simple User)
publicboolean
truncatedboolean
updated_atstring
urlstring
userstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_revisionselectgist_id, shaGets a specified gist revision.

This endpoint supports the following custom media types. For more information, see "Media types."

- application/vnd.github.raw+json: Returns the raw markdown. This is the default if you do not pass any specific media type.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
gist_idstringThe unique identifier of the gist.
shastring

SELECT examples

Gets a specified gist revision.

This endpoint supports the following custom media types. For more information, see "Media types."

- application/vnd.github.raw+json: Returns the raw markdown. This is the default if you do not pass any specific media type.

SELECT
id,
node_id,
comments,
comments_enabled,
comments_url,
commits_url,
created_at,
description,
files,
fork_of,
forks,
forks_url,
git_pull_url,
git_push_url,
history,
html_url,
owner,
public,
truncated,
updated_at,
url,
user
FROM github.gists.revisions
WHERE gist_id = '{{ gist_id }}' -- required
AND sha = '{{ sha }}' -- required
;