turbot/gitlab_insights

Query: branch_table

Usage

powerpipe query gitlab_insights.query.branch_table

SQL

select
p.full_path as "Project",
b.name as "Branch",
b.default as "Is Default",
b.merged as "Is Merged",
--now()::date - b.created_at::date as "Age in Days", --GitLab doesn't expose branch creation date...
now()::date - b.commit_date::date as "Days Since Last Commit",
b.web_url,
p.web_url as project_url
from
gitlab_my_project p
join gitlab_branch b on p.id = b.project_id;

Dashboards

The query is used in the dashboards: