turbot/gitlab_insights

Query: branch_unprotected_count

Usage

powerpipe query gitlab_insights.query.branch_unprotected_count

SQL

select
'Unprotected' as label,
count(b.*) as value,
case
when count(b.*) > 0 then 'alert'
else 'ok'
end as type
from
gitlab_my_project p
join gitlab_branch b on p.id = b.project_id
where
not b.protected;

Dashboards

The query is used in the dashboards: