File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Backport merged pull request
2
+ on :
3
+ pull_request_target :
4
+ types : [closed]
5
+ issue_comment :
6
+ types : [created]
7
+ permissions :
8
+ contents : write # so it can comment
9
+ pull-requests : write # so it can create pull requests
10
+ jobs :
11
+ backport :
12
+ name : Backport pull request
13
+ runs-on : ubuntu-latest
14
+
15
+ # Only run when pull request is merged
16
+ # or when a comment containing `/backport` is created by someone other than the
17
+ # https://github.com/backport-action bot user (user id: 97796249). Note that if you use your
18
+ # own PAT as `github_token`, that you should replace this id with yours.
19
+ if : >
20
+ (
21
+ github.event.pull_request.merged
22
+ ) || (
23
+ github.event_name == 'issue_comment' &&
24
+ github.event.issue.pull_request &&
25
+ github.event.comment.user.id != 97796249 &&
26
+ contains(github.event.comment.body, '/backport')
27
+ )
28
+ steps :
29
+ - uses : actions/checkout@v3
30
+ - name : Create backport pull requests
31
+ uses : korthout/backport-action@v1
32
+ with :
33
+ pull_title : ' [${target_branch}] ${pull_title}'
34
+ merge_commits : ' skip'
You can’t perform that action at this time.
0 commit comments