turbot/github_sherlock

Control: Issues should not be open longer than 30 days

Description

Issues should be resolved or closed in a timely manner.

Usage

steampipe check github_sherlock.control.issue_older_30_days

Plugins & Tables

SQL

select
i.html_url as resource,
case
when i.created_at <= (current_date - interval '30' day) then 'alarm'
else 'ok'
end as status,
'#' || i.issue_number || ' ' || i.title || ' created ' || to_char(i.created_at , 'DD-Mon-YYYY') ||
' (' || extract(day from current_timestamp - i.created_at) || ' days).' as reason,
i.repository_full_name
from
github_my_repository as r
left join github_issue as i on r.full_name = i.repository_full_name
where
r.fork = false and i.state = 'open'