diff --git a/.github/workflows/pull_request_closed.yml b/.github/workflows/pull_request_closed.yml index 7bdf9b9208..0960834d23 100644 --- a/.github/workflows/pull_request_closed.yml +++ b/.github/workflows/pull_request_closed.yml @@ -1,15 +1,17 @@ name: Pull Request Closed + on: pull_request: branches: [master] types: [closed] + jobs: cherry_pick: if: ${{github.event.pull_request.merged == true}} runs-on: ubuntu-22.04 steps: - name: Should create PR to production? - uses: peter-evans/find-comment@v1 + uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e id: fc with: issue-number: ${{github.event.number}} @@ -39,7 +41,7 @@ jobs: echo "##[set-output name=branch;]$(echo ${BRANCH_NAME})" - name: Failed cherry-pick if: ${{ failure() }} - uses: peter-evans/create-or-update-comment@v1 + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 with: issue-number: ${{github.event.number}} body: | @@ -47,18 +49,14 @@ jobs: - name: pull-request id: pr if: steps.fc.outputs.comment-id != '' - uses: repo-sync/pull-request@v2 + uses: actions/checkout@v3 with: - destination_branch: "production" - source_branch: ${{ steps.cp.outputs.branch }} - github_token: ${{ secrets.GITHUB_TOKEN }} - pr_title: "Merge ${{ steps.cp.outputs.branch }} into production" - pr_body: | - *This is automatically generated PR* - PR from master branch: #${{github.event.number}}. Once the change is merged, upload the changes to LIVE. + token: '${{ secrets.GITHUB_TOKEN }}' + run: | + gh pr create --base production --head ${{ steps.cp.outputs.branch }} --title "Merge ${{ steps.cp.outputs.branch }} into production" --body "Automatically generated PR from master branch: #${{github.event.number}}. Once the change is merged, upload the changes to LIVE." - name: Post PR link if: steps.pr.outputs.pr_url != '' - uses: peter-evans/create-or-update-comment@v1 + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 with: issue-number: ${{github.event.number}} body: |