steampipe plugin install github

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 in where or join 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_profile
where
repository_full_name = 'turbot/steampipe';
select
*
from
github_community_profile
where
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_content
from
github_community_profile c
join github_my_repository r on r.name_with_owner = c.repository_full_name
where
security is not null;
select
repository_full_name,
json_extract(security, '$.text') as security_file_content
from
github_community_profile c
join github_my_repository r on r.name_with_owner = c.repository_full_name
where
security is not null;

Schema for github_community_profile

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
code_of_conductjsonbCode of conduct for the repository.
contributingjsonbContributing guidelines for the repository.
issue_templatesjsonbIssue template for the repository.
license_infojsonbLicense for the repository.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
pull_request_templatesjsonbPull request template for the repository.
readmejsonbREADME for the repository.
repository_full_nametext=Full name of the repository that contains the tag.
securityjsonbSecurity for the repository.
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_community_profile