-
Notifications
You must be signed in to change notification settings - Fork 4.8k
27 lines (27 loc) · 1.05 KB
/
backport.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Backport
on:
pull_request_target:
types: [closed]
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
jobs:
backport:
name: Backport
runs-on: ubuntu-latest
if: github.event.pull_request.merged
steps:
- uses: actions/checkout@v4
- name: Create backport pull requests
uses: korthout/backport-action@cb79e4e5f46c7d7d653dd3d5fa8a9b0a945dfe4b # v2.1.0
with:
github_token: ${{ secrets.PAT }}
pull_title: '[backport -> ${target_branch}] ${pull_title}'
merge_commits: 'skip'
copy_labels_pattern: ^(?!backport ).* # copies all labels except those starting with "backport "
label_pattern: ^backport (release\/[^ ]+)$ # filters for labels starting with "backport " and extracts the branch name
pull_description: |-
Automated backport to `${target_branch}`, triggered by a label in #${pull_number}.
copy_assignees: true
copy_milestone: true
copy_requested_reviewers: true