Skip to content

Commit

Permalink
Merge pull request #1694 from genesiscommunitysuccess/PTL-1322
Browse files Browse the repository at this point in the history
feat: Adding a way to delete Branches on PR Close (PTL-1322)
  • Loading branch information
GuiWar authored May 29, 2024
2 parents 6f09a80 + b8bd2dc commit 2537bcf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/delete-closed-pr-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Delete Branches on PR Close
on:
pull_request:
types:
- closed
jobs:
delete-branch:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Delete branch
run: |
# Get the branch name from the pull request
BRANCH_NAME=$(echo "${{ github.event.pull_request.head.ref }}")
# Delete the branch
git push origin --delete "$BRANCH_NAME"

0 comments on commit 2537bcf

Please sign in to comment.