We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34fe26b commit 3d997d3Copy full SHA for 3d997d3
.github/workflows/main.yml
@@ -0,0 +1,22 @@
1
+name: Delete Merged Branch
2
+
3
+on:
4
+ pull_request:
5
+ types:
6
+ - closed
7
8
+jobs:
9
+ delete_branch:
10
+ if: github.event.pull_request.merged == true
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ with:
18
+ ref: ${{ github.event.pull_request.base.ref }} # Checkout the target branch
19
20
+ - name: Delete source branch
21
+ run: |
22
+ git push origin --delete ${{ github.event.pull_request.head.ref }}
0 commit comments