steampipe plugin install github

Table: github_repository_environment - Query GitHub Repository Environments using SQL

GitHub Repository Environments are a feature of GitHub that allows developers to manage and track their software deployment pipelines. Each environment represents a stage in the deployment workflow, such as production, staging, or testing. Environments can have specific deployment policies and protection rules, providing a controlled and secure workflow for deploying software.

Table Usage Guide

The github_repository_environment table provides insights into GitHub repository environments. As a DevOps engineer or a repository manager, explore environment-specific details through this table, including environment names, URLs, and protection rules. Utilize it to manage and monitor the deployment workflow, ensuring controlled and secure software deployment.

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 environments for a repository

Explore which environments are associated with a particular repository. This can be useful for understanding the different settings where your code is being tested or deployed.

select
id,
node_id,
name
from
github_repository_environment
where
repository_full_name = 'turbot/steampipe';
select
id,
node_id,
name
from
github_repository_environment
where
repository_full_name = 'turbot/steampipe';

List environments all your repositories

Discover the segments that contain all your repository environments. This allows you to identify and manage the environments in which your code is running, helping you enhance your project's efficiency and security.

select
id,
node_id,
name
from
github_repository_environment
where
repository_full_name in (
select
name_with_owner
from
github_my_repository
);
select
id,
node_id,
name
from
github_repository_environment
where
repository_full_name in (
select
name_with_owner
from
github_my_repository
);

Schema for github_repository_environment

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
idbigintThe ID of the environment.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
nametextThe name of the environment.
node_idtextThe node ID of the environment.
repository_full_nametext=The full name of the repository (login/repo-name).
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.

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_repository_environment