diff --git a/.github/workflows/backport.yml b/.github/workflows/cherry-pick.yml similarity index 72% rename from .github/workflows/backport.yml rename to .github/workflows/cherry-pick.yml index 28482fd..4def090 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/cherry-pick.yml @@ -8,12 +8,9 @@ permissions: contents: write # so it can comment pull-requests: write # so it can create pull requests jobs: - backport: - name: Backport pull request + cherry-pick: + name: Cherry-pick pull request 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 CI bot if: > ( github.event_name == 'pull_request_target' && @@ -21,8 +18,7 @@ jobs: ) || ( github.event_name == 'issue_comment' && github.event.issue.pull_request && - github.event.comment.user.id != 278318962 && - startsWith(github.event.comment.body, '/cherry-pick') + contains(github.event.comment.body, '/cherry-pick') ) steps: - uses: actions/create-github-app-token@v3 @@ -31,8 +27,8 @@ jobs: app-id: ${{ vars.CI_APP_ID }} private-key: ${{ secrets.CI_APP_KEY }} - uses: actions/checkout@v6 - - name: Create backport pull requests - uses: korthout/backport-action@v4 + - name: cherry-pick pull request + uses: creydr/cherry-pick-action@v1 with: github_token: ${{ steps.app-token.outputs.token }} add_author_as_assignee: true