Skip to main content

GitHub Cloud Query

Background

The Run GitHub Cloud Query Action performs PostgreSQL queries on GitHub resources with a powerful and simple syntax.

For example, listing all branches of a GitHub repo can be done simply:

select
name,
commit_sha,
protected
from
github_branch
where
repository_full_name = 'org/repo';

List all visible teams in an organization:

select
name,
slug,
privacy,
description
from
github_team
where
organization = 'my_org';

A query to list issues that took more than 30 days to close:

select
title,
id,
state,
created_at,
closed_at,
html_url
from
github_search_issue
where
query = 'org:turbot state:closed'
and closed_at > (created_at + interval '30' day);

A full description of all existing tables and official examples are provided here:

info

Blink's supported Steampipe version is: v0.25.0.

Action Parameters

ParameterDescription
SQL statementThe SQL statement we wish to use to query the resource.
Output formatRepresentation of the output result. The possible options are "Table", "CSV" or "JSON".

RunGitHubCloudQuery

note

This action does not support GitHub Oauth connections.