-
Notifications
You must be signed in to change notification settings - Fork 759
GitHub Action to delete merged stale branches #9542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Action to delete merged stale branches #9542
Conversation
|
I am a little wary of monthly automated branch deletions, as it is possible that I might merge something and then need to go back to the merged branch 4 weeks later for something. For safety, would it be possible to set PRs assigned to me as Manual delete status only? |
I think Olu's writing above solves my issue. I'll just include "backup" in the important ones. |
MarkvanMents
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @OlufunkeMoronfolu
This all looks good as far as I can tell.
However, it might be a good idea for you to walk me through the code so that I can understand it better and we can ensure that there are no edge cases we have forgotten.
But it is a great use of GitHub actions and perhaps will help us to create more actions in the future?
Set up a meeting when you are back from PTO and we can go through it together - perhaps when we are both in the office.
Thanks for doing this
Mark
MarkvanMents
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - feel free to merge. Approving.
When it is run the first time can you make sure everyone on the team checks the branches to be deleted, in case we have missed an exception.
For future improvements, can you also add to your backlog to list any branches for closed PRs which were not merged so that people can review them and delete them if they aren't needed.
Great work to automate this, since lots of branches were not getting deleted.
This PR introduces a GitHub Action that automates branch deletion and removes the need for authors to delete branches by themselves (as we currently do).
This Loop document shares more info about the process involved with creating this PR.
Activity diagram for easy understanding: