A GitHub action to automatically delete the branch after a pull request has been merged.
by jessfrazShell
Last 12 weeks · 0 commits
2 of 6 standards met
Hey there! I'm new to GitHub actions, so if this is incorrect at all, I apologize! Here's the issue I'm seeing. I've got a repo that I'd like to use this with. We have a large team working on this project and many people are leaving stale branches around. Anyhow, I went ahead and created a GitHub workflow as defined below (using the new yaml syntax): When I open a new pull request on this repo, this workflow runs and exits without doing anything (since the PR hasn't been merged). When I merge the PR, however, this workflow doesn't run because it's only running on , and GitHub doesn't consider a merged PR to be a pull_request event, apparently. I wonder if this behavior has changed since this was first built? Anyhow: I can't seem to find a way to get this to run. Am I way off, or did GitHub change the way that the event works?
I started using this action before I figured out that a new feature might make this obsolete. Also after every run there was a hint in the run-overview that parameters are not officially recognised. This was due to missing meta-data for the github action. Please feel free to accept or decline the PR if it does not make sense. It's a super small change that just might help others to figure things out faster. There was an Issue #5 mentioning the github blog post where branch-deletion is mentioned.
Repository: jessfraz/branch-cleanup-action. Description: A GitHub action to automatically delete the branch after a pull request has been merged. Stars: 422, Forks: 59. Primary language: Shell. Languages: Shell (73.6%), Makefile (16.4%), Dockerfile (10%). License: MIT. Open PRs: 1, open issues: 4. Last activity: 4y ago. Community health: 42%. Top contributors: jessfraz, fbartho, toc-me[bot], JonasJurczok, seiffert, HoughIO, hkdobrev, sburns, mrwacky42, cclauss.