turbot/github_insights

Query: repository_license_table

Usage

powerpipe query github_insights.query.repository_license_table

Steampipe Tables

SQL

select
name_with_owner as "Repository",
license_info ->> 'key' as "License",
license_info ->> 'name' as "License Name",
case
when (license_info ->> 'key' in ('lgpl-3.0','lgpl-2.1','mpl-2.0','epl-2.0','osl-3.0','eupl-1.2')) then 'weak copyleft'
when (license_info ->> 'key' in ('gpl-3.0','gpl-2.0','agpl-3.0','agpl-2.0','cc-by-sa-4.0','apsl')) then 'popular copyleft'
when (license_info ->> 'key' in ('apache-2.0','mit','bsd-3','bsd-2','bsd-3-clause','bsd2-clause', 'cc-by-4.0', 'wtfpl', 'ms-pl', 'unlicensed')) then 'permissive'
when (license_info ->> 'key' is null) then null
else 'other'
end as "License Type",
url
from
github_my_repository
order by
"License";

Dashboards

The query is used in the dashboards: