SPIKE: Prune stale git branches in github.com/folio-org (policy)
Description
Environment
Potential Workaround
Attachments
- 08 Jan 2025, 07:31 AM
- 08 Jan 2025, 07:31 AM
- 14 Nov 2024, 06:19 AM
- 14 Nov 2024, 06:19 AM
Checklist
hideTestRail: Results
Activity
Wayne Schneider January 21, 2025 at 1:38 PM
We tried being nice, but have gotten no response. @David Crossleywill investigate automation via Github Actions or via interaction with the Github API. We will then run a policy by Craig, Mark, and Oleksii and implement.
David Crossley January 8, 2025 at 7:30 AM
Re-generated the reports:
20250108-count-branches.tsv
20250108-count-open-pr.tsv
Wayne Schneider January 7, 2025 at 1:49 PM
@David Crossley will produce a new report and @Jakub Skoczen will raise again with Oleksii
Wayne Schneider November 19, 2024 at 1:36 PM
John will forward message to Jakub regarding call for action, to be forwarded to development leads (Craig & Oleksii). Social pressure is the preferred solution at this time.
If that is not effective, then we should propose some policy based around automated pruning (e.g. anything that is not named “b[0-9].*” is pruned after 90 days or whatever).
David Crossley November 14, 2024 at 6:19 AM
The JSON file _data/repos.json has some details about each repository (see maintenance notes, updated approximately weekly).
Obtain the raw file and apply 'jq':
jq -r '.repos[] | [.countBranches, .name] | @tsv' repos.json | sort -n -r
See attached 20241114-count-branches.tsv
jq -r '.repos[] | [.countOpenPullRequests, .name] | @tsv' repos.json | sort -n -r
See attached 20241114-count-open-pr.tsv
Many years of FOLIO development and a few hundred repos have resulted in lots of stale or abandoned branches, PRs, and existing branches that have been merged but not deleted. These should be cleaned up. This also impacts the performance and storage capacity on the Jenkins server. We should also develop a policy that dictates and enforces the maximum length of time an PR will remain open before it is automatically closed and stale branches deleted.