GitHub action delete branchs after pull-request is merged
GitHub action using @jessfraz implementation described in her blog post.
- delete-merged-branch-config.yml - under .github folder
Just change the branches that you want to perform the action and move the file delete-merged-branch-config.yml into .github/workspace.
Notice that the branch deleted will be the one that you open the pull request, and not the ones you specify bellow. For exemple: feature/label to develop, the branch deleted will be feature/label and not develop.
branches:
- master
- develop*
You might be thinking if it will delete some branch that not meant to be deleted.
- Deleted branches can be recovered
- You can protect your branches