github.heygears.com/openimsdk/tools@v0.0.49/.github/workflows/bot-cherry-pick.yml (about)

     1  # Copyright © 2023 OpenIM open source community. All rights reserved.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  name: Github Rebot for Cherry Pick On Comment
    16  on:
    17    issue_comment:
    18      types: [created]
    19  jobs:
    20    cherry-pick:
    21      name: Cherry Pick
    22      # && github.event.comment.user.login=='kubbot'
    23      if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick')
    24      runs-on: ubuntu-latest
    25      steps:
    26        - name: Checkout the latest code
    27          uses: actions/checkout@v4
    28          with:
    29            token: ${{ secrets.BOT_GITHUB_TOKEN }}
    30            fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
    31        - name: Automatic Cherry Pick
    32          uses: vendoo/gha-cherry-pick@v1
    33          env:
    34            GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}