Dev Ops · n8n

Clean Up the 80 Dead Branches Cluttering Your Repo

Merged and abandoned branches pile up until nobody can find anything. Get a monthly list of stale branches per author with one-click cleanup confirmation.

difficulty Beginnersetup 25 minresult The repo stays navigable because dead branches get flagged to their authors monthly.
  1. 1

    Scan the Branches

    Add a Schedule Trigger monthly and a GitHub node listing branches by last commit date.

  2. 2

    Identify the Stale

    Add a Code node flagging merged branches and those untouched for 90+ days.

  3. 3

    Ask the Authors

    Add a Slack DM per author listing their stale branches with keep/delete buttons.

  4. 4

    Delete on Confirmation

    Add a GitHub node removing branches the author confirms.

  5. 5

    Activate and Test

    Activate the workflow on a test repo. Confirm the stale list and cleanup work.

Frequently asked questions

Why not auto-delete merged branches?

Auto-delete merged ones freely; unmerged stale branches deserve the author's one-click confirmation.

Does clutter actually hurt?

Slower clones, confusing searches and accidental work on dead code — tidiness here is cheap and real.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.