stale icon indicating copy to clipboard operation
stale copied to clipboard

Remove Stale Branches

Open MichaelCordingley opened this issue 1 year ago • 6 comments

Description: Automatically remove branches that are not associated with an open issue and are more than X days stale.

Previously described in https://github.com/actions/stale/issues/620, which ironically closed due to staleness.

Justification: Branches are another form of cruft that builds up and becomes stale.

Are you willing to submit a PR? I'm probably not the best person to do so, else I would

MichaelCordingley avatar Aug 15 '24 15:08 MichaelCordingley

Hello @MichaelCordingley, Thank you for the feature request. We will take a look and come back to you with the details!

priyagupta108 avatar Aug 16 '24 05:08 priyagupta108

Thank you!

MichaelCordingley avatar Aug 16 '24 13:08 MichaelCordingley

Adding to this; I'd like to be able to delete stale branches that have already been merged. There is already an option to Automatically delete head branches but it would be nice to only perform this once a branch is considered stale (and has been merged).

Edit: To be clear, I would NOT want to automatically delete unmerged stale branches. I only want to delete stale branches that are associated with a pull request that has been merged.

nemchik avatar Aug 20 '24 20:08 nemchik

@priyagupta108 Checking in. Have you had a chance to take a look, yet?

MichaelCordingley avatar Sep 19 '24 14:09 MichaelCordingley

Bump/Keep-Alive

MichaelCordingley avatar Oct 15 '24 17:10 MichaelCordingley

+1 — I'm also interested in this feature.

Out of curiosity, what automations are you currently using or considering for handling stale branches? @MichaelCordingley @nemchik

nellai-m avatar Oct 19 '25 23:10 nellai-m