Stale Branch Cleanup Report
Weekly: identify branches untouched >30 days, LLM suggests safe deletions and cleanup benefit (reduced merge confusion, disk), posted to #devops.
Overview
**What it does**: Weekly schedule → GitHub API list all branches → code filter: last commit >30 days ago, exclude main/develop/release/* → LLM recommends candidates (why safe to delete, cleanup benefit per branch) → Slack to #devops with report. Prevents branch name bloat, simplifies git repo navigation, reduces merge conflict risk. **Setup (3 steps)**: 1. Connect GitHub: org + repo name, personal access token 2. Configure exclusions: patterns to never delete (release-*, staging, hotfix-*) 3. Set Slack channel: #devops **Apps/nodes**: Schedule, GitHub API (list branches), code node (filtering), OpenAI (report), Slack. **Credentials required**: GitHub personal access token, OpenAI account, Slack workspace. **Difficulty**: Easy | **Setup time**: 5 minutes. **Business outcome**: Git repo mental model ↑ clarity (fewer stale branches), merge conflicts ↓ (less surface area), disk usage ↓ slightly.
What's included
Quickstart
- 01
Download the JSON
With an active Library Pass, download the workflow file right from this page or your dashboard.
- 02
Import into n8n
Choose Import from File and select the downloaded JSON. The full agent graph appears, ready to configure.
- 03
Plug in credentials
Each integration node prompts for credentials on first run. The setup guide lists every credential the agent expects.
- 04
Activate and test
Run once with sample input, confirm the expected output, then flip the activate toggle.
Frequently Asked Questions
How do I import this workflow into n8n?
What credentials do I need to provide?
Are the credentials included in the JSON file?
Can I edit or customize the workflow after importing?
What n8n version is required?
What if something breaks after I import it?
Can I use this workflow for my customers or business?
Will the workflow receive updates?
Do I need n8n Pro or a paid plan?
Can I ask for a custom workflow?
Reviews (0)
No reviews yet. Be the first.
Sign in to leave a review.
Included with any pass
This agent — and every other in the library — comes with a Library Pass. One pass, the whole catalog.
Get a Library Pass- Every agent in the library
- All new releases while active
- Unlimited downloads
- Commercial-use license
- Priority email support
- 30-day money-back guarantee
More in Infrastructure
Auto-Scaling Decision Advisor
Every 15 minutes: check CPU/memory trends; if approaching limits, LLM recommends scale-up or scale-down actions with cost impact analysis.
Container Registry Tag Cleanup
Weekly scan: identify container images untouched >30 days, LLM recommends safe deletions prioritizing by size — keep registry lean and reduce storage costs.
Infrastructure Drift Detector
Hourly: compare Terraform desired state vs. live infrastructure; flag divergence (missing resources, config mismatches) to #infrastructure.