steampipe plugin install github

Table: github_gist - Query GitHub Gists using SQL

GitHub Gists are a simple way to share snippets and pastes with others. Gists are version controlled, forkable, and embeddable, making them an ideal tool for sharing and discussing code. They can be public or secret, and can be associated with a specific GitHub user or anonymous.

Table Usage Guide

The github_gist table provides insights into Gists within GitHub. As a developer or team lead, explore Gist-specific details through this table, including its description, comments, files, forks, history, owner, and public status. Utilize it to uncover information about Gists, such as their version history, fork details, and associated comments.

Important Notes

  • You must specify the id column in where or join clause to query the table.

Examples

Get details about ANY public gist (by id)

Explore the specifics of a publicly shared code snippet on Github by providing its unique ID. This is useful to understand the content and context of the code snippet without having to navigate through the Github platform.

select
*
from
github_gist
where
id = '633175';
select
*
from
github_gist
where
id = '633175';

Get file details about ANY public gist (by id)

Explore the contents of any public 'gist' on GitHub by specifying its unique ID. This can be useful for understanding the content and structure of shared code snippets without having to navigate to the GitHub site.

select
id,
jsonb_pretty(files)
from
github_gist
where
id = 'e85a3d8e7a23c247f672aaf95b6c3da9';
select
id,
files
from
github_gist
where
id = 'e85a3d8e7a23c247f672aaf95b6c3da9';

Schema for github_gist

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
commentsbigintThe number of comments for the gist.
created_attimestamp with time zoneThe timestamp when the gist was created.
descriptiontextThe gist description.
filesjsonbFiles in the gist.
git_pull_urltextThe https url to pull or clone the gist.
git_push_urltextThe https url to push the gist.
html_urltextThe HTML URL of the gist.
idtext=The unique id of the gist.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
node_idtextThe Node ID of the gist.
owner_idbigintThe user id (number) of the gist owner.
owner_logintextThe user login name of the gist owner.
owner_typetextThe type of the gist owner (User or Organization).
publicbooleanIf true, the gist is public, otherwise it is private.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
updated_attimestamp with time zoneThe timestamp when the gist was last updated.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- github

You can pass the configuration to the command with the --config argument:

steampipe_export_github --config '<your_config>' github_gist