|
1 | 1 | name: Pull Request Closed |
| 2 | + |
2 | 3 | on: |
3 | 4 | pull_request: |
4 | 5 | branches: [master] |
5 | 6 | types: [closed] |
| 7 | + |
6 | 8 | jobs: |
7 | 9 | cherry_pick: |
8 | 10 | if: ${{github.event.pull_request.merged == true}} |
9 | 11 | runs-on: ubuntu-22.04 |
10 | 12 | steps: |
11 | 13 | - name: Should create PR to production? |
12 | | - uses: peter-evans/find-comment@v1 |
| 14 | + uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e |
13 | 15 | id: fc |
14 | 16 | with: |
15 | 17 | issue-number: ${{github.event.number}} |
@@ -39,26 +41,22 @@ jobs: |
39 | 41 | echo "##[set-output name=branch;]$(echo ${BRANCH_NAME})" |
40 | 42 | - name: Failed cherry-pick |
41 | 43 | if: ${{ failure() }} |
42 | | - uses: peter-evans/create-or-update-comment@v1 |
| 44 | + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 |
43 | 45 | with: |
44 | 46 | issue-number: ${{github.event.number}} |
45 | 47 | body: | |
46 | 48 | Automatic cherry-pick & PR to production failed. Ping @telerik/blazor-admins for manual cherry-pick and push to production. |
47 | 49 | - name: pull-request |
48 | 50 | id: pr |
49 | 51 | if: steps.fc.outputs.comment-id != '' |
50 | | - uses: repo-sync/pull-request@v2 |
| 52 | + uses: actions/checkout@v3 |
51 | 53 | with: |
52 | | - destination_branch: "production" |
53 | | - source_branch: ${{ steps.cp.outputs.branch }} |
54 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
55 | | - pr_title: "Merge ${{ steps.cp.outputs.branch }} into production" |
56 | | - pr_body: | |
57 | | - *This is automatically generated PR* |
58 | | - PR from master branch: #${{github.event.number}}. Once the change is merged, upload the changes to LIVE. |
| 54 | + token: '${{ secrets.GITHUB_TOKEN }}' |
| 55 | + run: | |
| 56 | + 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." |
59 | 57 | - name: Post PR link |
60 | 58 | if: steps.pr.outputs.pr_url != '' |
61 | | - uses: peter-evans/create-or-update-comment@v1 |
| 59 | + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 |
62 | 60 | with: |
63 | 61 | issue-number: ${{github.event.number}} |
64 | 62 | body: | |
|
0 commit comments