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
andrepository_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, descriptionfrom github_search_labelwhere repository_id = 331646306 and query = 'bug enhancement blocked';
select id, repository_id, name, repository_full_name, descriptionfrom github_search_labelwhere 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, descriptionfrom github_search_labelwhere repository_id = 331646306 and query = 'work';
select id, repository_id, name, descriptionfrom github_search_labelwhere repository_id = 331646306 and query = 'work';
Schema for github_search_label
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
color | text | The color assigned to the label. | |
default | boolean | Whether the label is a default one. | |
description | text | The description of the label. | |
id | bigint | The ID of the label. | |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
name | text | The name of the label. | |
query | text | = | The query used to match the label. |
repository_full_name | text | The full name of the repository (login/repo-name). | |
repository_id | bigint | = | The ID of the repository. |
score | double precision | The score of the label. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
text_matches | jsonb | The text match details. | |
url | text | The 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