Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,28 @@ jobs:
runs-on: ubuntu-latest

# Only run when pull request is merged
# or when a comment starting with `/cherry-pick` is created by someone other than the
# https://github.com/backport-action bot user (user id: 97796249). Note that if you use your
# own PAT as `github_token`, that you should replace this id with yours.
# or when a comment starting with `/cherry-pick` is created by someone other than the CI bot
if: >
(
github.event_name == 'pull_request_target' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.comment.user.id != 97796249 &&
github.event.comment.user.id != 278318962 &&
startsWith(github.event.comment.body, '/cherry-pick')
)
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_KEY }}
- uses: actions/checkout@v4
- name: Create backport pull requests
uses: korthout/backport-action@v4
with:
github_token: ${{ steps.app-token.outputs.token }}
add_author_as_assignee: true
auto_merge_method: "squash"
pull_title: "[${target_branch}] ${pull_title}"
Expand Down
Loading