chore: clean up stale merged branches, add auto-cleanup workflow - #1956
Closed
Shashank-Tripathi-07 wants to merge 1 commit into
Closed
chore: clean up stale merged branches, add auto-cleanup workflow#1956Shashank-Tripathi-07 wants to merge 1 commit into
Shashank-Tripathi-07 wants to merge 1 commit into
Conversation
Collaborator
Author
|
I read this and went through this. Even though the idea I proposed earlier is quite right. We need to clean branches that are not deleted after their code is merged. But this hinders a lot of future workflows that we'll be building. I want to keep the future workflow launches smooth and don't want them to get into any trouble. I would insist in all maintainers having the attitude of deleting branches once their code is merged. |
Collaborator
Author
|
Closed and branch deleted as required. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Merged branches never get cleaned up, so the repo has accumulated a pile of dead branches with no way forward.
Fix
Adds
.github/workflows/infra-cleanup-stale-branches.yml: weekly, deletes any branch that's fully merged intodevand inactive 14+ days. Skipsmain,dev,gh-pages. Supportsworkflow_dispatchwith adry_runtoggle for manual testing.Only ever deletes branches whose commits are already an ancestor of
dev, so it can't lose work.Also included
30 branches already merged and safe to delete right now:
@profvjreddi could you delete these (or grant access) when you get a chance?
Test plan
workflow_dispatchwithdry_run: true, confirm candidate list matches abovemain/dev/gh-pagesand open-PR branches untouched