Skip to content

Commit 8003c3f

Browse files
authored
Add backport action
1 parent d23204a commit 8003c3f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/backport_pr.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy