Table: github_community_profile - Query Github Community Profiles using SQL
A Github Community Profile is a measure of the health and community activity of a repository. It includes factors such as the presence of a code of conduct, contributing guidelines, and issue and pull request templates. A healthy community profile indicates a well-maintained, welcoming, and sustainable open-source project.
Table Usage Guide
The github_community_profile
table provides insights into the health and community activity of Github repositories. As a repository owner or contributor, explore details through this table, including the presence of contributing guidelines, code of conduct, and issue templates. Utilize it to evaluate the health of repositories, understand their community engagement, and identify areas for improvement.
Important Notes
- You must specify the
repository_full_name
column inwhere
orjoin
clause to query the table.
Examples
Get community profile information for the repository
Explore the community profile details for a specific repository to gain insights into the repository's health and activity. This is useful for assessing the repository's contribution guidelines, code of conduct, and other community-related aspects.
select *from github_community_profilewhere repository_full_name = 'turbot/steampipe';
select *from github_community_profilewhere repository_full_name = 'turbot/steampipe';
List repositories having the security file
This example helps identify the GitHub repositories that have a security file in place. This is useful for understanding the security measures implemented in each repository, which is crucial for maintaining project integrity and preventing unauthorized access.
select repository_full_name, security ->> 'text' as security_file_contentfrom github_community_profile c join github_my_repository r on r.name_with_owner = c.repository_full_namewhere security is not null;
select repository_full_name, json_extract(security, '$.text') as security_file_contentfrom github_community_profile c join github_my_repository r on r.name_with_owner = c.repository_full_namewhere security is not null;
Control examples
Schema for github_community_profile
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
code_of_conduct | jsonb | Code of conduct for the repository. | |
contributing | jsonb | Contributing guidelines for the repository. | |
issue_templates | jsonb | Issue template for the repository. | |
license_info | jsonb | License for the repository. | |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
pull_request_templates | jsonb | Pull request template for the repository. | |
readme | jsonb | README for the repository. | |
repository_full_name | text | = | Full name of the repository that contains the tag. |
security | jsonb | Security for the repository. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe 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_community_profile