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 ed5a97a commit de3b771Copy full SHA for de3b771
.github/workflows/Cleanup.RedistBranch.yaml
@@ -0,0 +1,27 @@
1
+name: "Cleanup.RedistBranch"
2
+
3
+on:
4
+ pull_request:
5
+ types:
6
+ - closed
7
8
+jobs:
9
+ cleanup-redist-branch:
10
+ name: "Cleanup Redist Branch"
11
+ if: >
12
+ github.event.pull_request.merged == true &&
13
+ github.event.pull_request.head.repo.full_name == github.repository &&
14
+ startsWith(github.event.pull_request.head.ref, 'redist-update/')
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: write
18
+ steps:
19
+ - name: Delete PR branch
20
+ run: |
21
+ BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
22
+ echo "Deleting redist PR branch: $BRANCH_NAME"
23
+ gh api \
24
+ -X DELETE \
25
+ "repos/${{ github.repository }}/git/refs/heads/$BRANCH_NAME"
26
+ env:
27
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments