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 inwhere
orjoin
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_gistwhere id = '633175';
select *from github_gistwhere 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_gistwhere id = 'e85a3d8e7a23c247f672aaf95b6c3da9';
select id, filesfrom github_gistwhere id = 'e85a3d8e7a23c247f672aaf95b6c3da9';
Schema for github_gist
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
comments | bigint | The number of comments for the gist. | |
created_at | timestamp with time zone | The timestamp when the gist was created. | |
description | text | The gist description. | |
files | jsonb | Files in the gist. | |
git_pull_url | text | The https url to pull or clone the gist. | |
git_push_url | text | The https url to push the gist. | |
html_url | text | The HTML URL of the gist. | |
id | text | = | The unique id of the gist. |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
node_id | text | The Node ID of the gist. | |
owner_id | bigint | The user id (number) of the gist owner. | |
owner_login | text | The user login name of the gist owner. | |
owner_type | text | The type of the gist owner (User or Organization). | |
public | boolean | If true, the gist is public, otherwise it is private. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
updated_at | timestamp with time zone | The 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