Skip to content

Commit b7ece59

Browse files
RileyJergerAmazonRyanL1997cwperks
authored
Update delete_backport_branch workflow to include release-chores branches (opensearch-project#5548)
Signed-off-by: Riley Jerger <[email protected]> Signed-off-by: Riley Jerger <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Jialiang Liang <[email protected]> Co-authored-by: Craig Perkins <[email protected]>
1 parent e190264 commit b7ece59

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/delete_backport_branch.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ on:
77
jobs:
88
delete-branch:
99
runs-on: ubuntu-latest
10-
if: startsWith(github.event.pull_request.head.ref,'backport/')
10+
permissions:
11+
contents: write
12+
if: startsWith(github.event.pull_request.head.ref,'backport/') || startsWith(github.event.pull_request.head.ref,'release-chores/')
1113
steps:
1214
- name: Delete merged branch
13-
uses: SvanBoxel/delete-merged-branch@2b5b058e3db41a3328fd9a6a58fd4c2545a14353
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
github.rest.git.deleteRef({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
ref: `heads/${context.payload.pull_request.head.ref}`,
22+
})

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1818
### Refactoring
1919

2020
### Maintenance
21+
- Update delete_backport_branch workflow to include release-chores branches ([#5548](https://github.com/opensearch-project/security/pull/5548))
2122
- Bump `1password/load-secrets-action` from 2 to 3 ([#5573](https://github.com/opensearch-project/security/pull/5573))
2223
- Bump `jjwt_version` from 0.12.6 to 0.13.0 ([#5568](https://github.com/opensearch-project/security/pull/5568), [#5581](https://github.com/opensearch-project/security/pull/5581))
2324
- Bump `org.mockito:mockito-core` from 5.18.0 to 5.19.0 ([#5566](https://github.com/opensearch-project/security/pull/5566))

0 commit comments

Comments
 (0)