diff --git a/.github/scripts/create-cherry-pick-pr.sh b/.github/scripts/create-cherry-pick-pr.sh old mode 100644 new mode 100755 diff --git a/.github/workflows/create-cherry-pick-pr.yml b/.github/workflows/create-cherry-pick-pr.yml index edba8ae8df6c..c409364bcd07 100644 --- a/.github/workflows/create-cherry-pick-pr.yml +++ b/.github/workflows/create-cherry-pick-pr.yml @@ -1,30 +1,31 @@ name: Cherry Pick Commit on: - workflow_dispatch: - inputs: - branch_name: - description: 'Branch name you want the cherry-pick branch to be based from' - required: true - commit_hash: - description: 'Commit Hash' - required: true - PR_number: - description: 'PR # Associated with Cherry Pick' - required: true + pull_request: + types: [opened, synchronize, reopened] jobs: cherry-pick: runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ vars.GITHUB_REF }} + fetch-depth: 0 + token: ${{ secrets.BUG_REPORT_TOKEN }} + - name: Get Node.js version + id: nvm + run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-node@v3 + with: + node-version: ${{ steps.nvm.outputs.NODE_VERSION }} - name: Create Cherry Pick PR id: create-cherry-pick-pr shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ./.github/scripts/create-cherry-pick-pr.sh ${{ github.event.inputs.branch_name }} ${{ github.event.inputs.commit_hash }} ${{ github.event.inputs.PR_number }} + ./.github/scripts/create-cherry-pick-pr.sh Version-v11.14.2 378bb27 24171