steampipe plugin install github

Table: github_search_label - Query GitHub Labels using SQL

GitHub Labels are a feature within GitHub that allows users to categorize and filter issues and pull requests. They are customizable and can be used in a variety of ways, including to indicate priority, type of work, or status. Labels are a powerful tool for managing work and communicating about issues and pull requests across the team.

Table Usage Guide

The github_search_label table provides insights into Labels within GitHub. As a project manager or developer, explore label-specific details through this table, including color, default status, and associated metadata. Utilize it to uncover information about labels, such as their usage across issues and pull requests, and to facilitate efficient project management and issue tracking.

Important Notes

  • You must always include at least one search term and repository ID when searching source code in the where or join clause using the query and repository_id columns respectively.

Examples

List labels for bug, enhancement and blocked

Determine the areas in which specific labels such as 'bug', 'enhancement', and 'blocked' are used within a particular GitHub repository. This allows for a better understanding of issue categorization and priority setting within the project.

select
id,
repository_id,
name,
repository_full_name,
description
from
github_search_label
where
repository_id = 331646306
and query = 'bug enhancement blocked';
select
id,
repository_id,
name,
repository_full_name,
description
from
github_search_label
where
repository_id = 331646306
and query = 'bug enhancement blocked';

List labels where specific text matches in name or description

Determine the areas in which specific text matches in labels' name or description within a particular GitHub repository. This can be used to quickly locate and organize labels related to a specific topic or task.

select
id,
repository_id,
name,
description
from
github_search_label
where
repository_id = 331646306
and query = 'work';
select
id,
repository_id,
name,
description
from
github_search_label
where
repository_id = 331646306
and query = 'work';

Schema for github_search_label

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
colortextThe color assigned to the label.
defaultbooleanWhether the label is a default one.
descriptiontextThe description of the label.
idbigintThe ID of the label.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
nametextThe name of the label.
querytext=The query used to match the label.
repository_full_nametextThe full name of the repository (login/repo-name).
repository_idbigint=The ID of the repository.
scoredouble precisionThe score of the label.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
text_matchesjsonbThe text match details.
urltextThe API URL to get the label details.

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_search_label