turbot/github_insights

Query: open_pull_request_table

Usage

powerpipe query github_insights.query.open_pull_request_table

SQL

select
'#' || number || ' ' || title as "PR",
repository_full_name as "Repository",
now()::date - p.created_at::date as "Age in Days",
now()::date - p.updated_at::date as "Days Since Last Update",
mergeable as "Mergeable State",
author ->> 'login' as "Author",
author ->> 'url' as "author_url",
case
when author_association = 'NONE' then 'External'
else initcap(author_association)
end as "Author Association",
p.url,
r.url as repo_url
from
github_my_repository r
join github_pull_request p on p.repository_full_name = r.name_with_owner
where
p.state = 'OPEN'
order by
"Age in Days" desc;

Dashboards

The query is used in the dashboards: