steampipe plugin install github

Table: github_release - Query GitHub Releases using SQL

GitHub Releases is a feature of GitHub that allows you to present significant points in your repository's history, such as milestone versions, by associating them with tags. You can use GitHub Releases to manage and upload binary files, as well as providing release notes and links to binary files, directly from a repository. GitHub Releases is a great way to package software, release notes, and links to binary files for other people to use.

Table Usage Guide

The github_release table provides insights into GitHub Releases within a repository. As a software developer or project manager, explore release-specific details through this table, including release id, tag name, draft status, prerelease status, and more. Utilize it to track the progress and status of different versions of your software, identify any prerelease versions, and manage your software releases more effectively.

Important Notes

  • You must specify the repository_full_name (repository including org/user prefix) column in the where or join clause to query the table.

Examples

List releases

Explore the timeline of updates for the Steampipe project on Github. This allows you to track the progression of the project over time, helping you stay updated on new releases and changes.

select
name,
published_at
from
github_release
where
repository_full_name = 'turbot/steampipe'
order by
published_at desc;
select
name,
published_at
from
github_release
where
repository_full_name = 'turbot/steampipe'
order by
published_at desc;

Download statistics per release

Explore the popularity of different Steampipe releases by tracking the number of downloads. This can help in understanding user preferences and identifying the most successful releases.

select
r.name as release_name,
r.published_at,
a ->> 'name' as asset_name,
a ->> 'download_count' as download_count
from
github_release as r,
jsonb_array_elements(assets) as a
where
r.repository_full_name = 'turbot/steampipe'
and a ->> 'content_type' in ('application/zip', 'application/gzip')
order by
r.published_at desc,
asset_name;
select
r.name as release_name,
r.published_at,
json_extract(a.value, '$.name') as asset_name,
json_extract(a.value, '$.download_count') as download_count
from
github_release as r,
json_each(assets) as a
where
r.repository_full_name = 'turbot/steampipe'
and json_extract(a.value, '$.content_type') in ('application/zip', 'application/gzip')
order by
r.published_at desc,
asset_name;

Schema for github_release

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
assetsjsonbList of assets contained in the release.
assets_urltextAssets URL for the release.
author_logintextThe login name of the user that created the release.
bodytextText describing the contents of the tag.
created_attimestamp with time zoneTime when the release was created.
draftbooleanTrue if this is a draft (unpublished) release.
html_urltextHTML URL for the release.
idbigint=Unique ID of the release.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
nametextThe name of the release.
node_idtextNode where GitHub stores this data internally.
prereleasebooleanTrue if this is a prerelease version.
published_attimestamp with time zoneTime when the release was published.
repository_full_nametext=Full name of the repository that contains the release.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tag_nametextThe name of the tag the release is associated with.
tarball_urltextTarball URL for the release.
target_commitishtextSpecifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA.
upload_urltextUpload URL for the release.
urltextURL of the release.
zipball_urltextZipball URL for the release.

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_release