Skip to content

Commit d8a7552

Browse files
authored
Create backport.yaml
1 parent e24d3c8 commit d8a7552

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/backport.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Backport
2+
on:
3+
pull_request:
4+
types: [closed, labeled]
5+
permissions:
6+
contents: write # so it can comment
7+
pull-requests: write # so it can create pull requests
8+
actions: write
9+
jobs:
10+
backport:
11+
name: Backport
12+
runs-on: ubuntu-latest
13+
if: github.event.pull_request.merged
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Create backport pull requests
17+
uses: korthout/backport-action@924c8170740fa1e3685f69014971f7f251633f53 # v2.4.1
18+
id: backport
19+
with:
20+
pull_title: '[backport -> ${target_branch}] ${pull_title}'
21+
merge_commits: 'skip'
22+
copy_labels_pattern: ^(?!backport ).* # copies all labels except those starting with "backport "
23+
label_pattern: ^backport (3scale\/[^ ]+)$ # filters for labels starting with "backport " and extracts the branch name
24+
pull_description: |-
25+
Automated backport to `${target_branch}`, triggered by a label in #${pull_number}.
26+
27+
## Original description
28+
29+
${pull_description}
30+
copy_assignees: true
31+
copy_requested_reviewers: true
32+
experimental: >
33+
{
34+
"detect_merge_method": true
35+
}

0 commit comments

Comments
 (0)