Skip to content

Commit ef3d9fd

Browse files
Add prevent condition due to SvanBoxel/delete-merged-branch#204 issues
Signed-off-by: Peter Zhu <[email protected]>
1 parent a36e42f commit ef3d9fd

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

Diff for: .github/workflows/delete_backport_branch.yml

-15
This file was deleted.

Diff for: .github/workflows/delete_merged_branch.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ on:
77
jobs:
88
delete-branch:
99
runs-on: ubuntu-latest
10-
if: startsWith(github.event.pull_request.head.repo.full_name, 'opensearch-project/documentation-website')
10+
if: |
11+
startsWith(github.event.pull_request.head.repo.full_name, 'opensearch-project/documentation-website') &&
12+
startsWith(! github.event.pull_request.head.ref, 'main') &&
13+
startsWith(! github.event.pull_request.head.ref, '1.') &&
14+
startsWith(! github.event.pull_request.head.ref, '2.') &&
15+
startsWith(! github.event.pull_request.head.ref, 'version/')
1116
steps:
1217
- name: Echo remove branch
1318
run: echo Removing ${{github.event.pull_request.head.ref}}

0 commit comments

Comments
 (0)