Open dginther opened 3 years ago
I personally would propose that the automated solution target and purge branches over 90 days of age. One could argue that considering the speed at which development often moves, 90 day old branches are typically long and far behind current work / initiatives / etc.
My proposal for the solution would be (if possible) a github action that leverages the GitHub API to find and delete all branches in all repos we touch over 90 days of age. I could also see expanding it to 6 months at first and then tweak / reduce from there.
Perhaps something along the lines of the discussion seen here: https://stackoverflow.com/questions/10325599/delete-all-branches-that-are-more-than-x-days-weeks-old/49998249
The Problem
A number of our GitHub repositories have stale branches. These branches can present problems, specifically w/ Jenkins when repository scans occur. Each branch corresponds to at least 1 GH API request. These branches also correspond to disk space on our jenkins
More Context
This is a postmortem action item from an outage incurred when our GitHub API limit was exhausted. https://github.com/department-of-veterans-affairs/va.gov-team-sensitive/pull/305
Work to be Done
Acceptance Criteria