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 thewhere
orjoin
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_atfrom github_releasewhere repository_full_name = 'turbot/steampipe'order by published_at desc;
select name, published_atfrom github_releasewhere 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_countfrom github_release as r, jsonb_array_elements(assets) as awhere 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_countfrom github_release as r, json_each(assets) as awhere 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
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
assets | jsonb | List of assets contained in the release. | |
assets_url | text | Assets URL for the release. | |
author_login | text | The login name of the user that created the release. | |
body | text | Text describing the contents of the tag. | |
created_at | timestamp with time zone | Time when the release was created. | |
draft | boolean | True if this is a draft (unpublished) release. | |
html_url | text | HTML URL for the release. | |
id | bigint | = | Unique ID of the release. |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
name | text | The name of the release. | |
node_id | text | Node where GitHub stores this data internally. | |
prerelease | boolean | True if this is a prerelease version. | |
published_at | timestamp with time zone | Time when the release was published. | |
repository_full_name | text | = | Full name of the repository that contains the release. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tag_name | text | The name of the tag the release is associated with. | |
tarball_url | text | Tarball URL for the release. | |
target_commitish | text | Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. | |
upload_url | text | Upload URL for the release. | |
url | text | URL of the release. | |
zipball_url | text | Zipball 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