Skip to content

Commit 1876a2a

Browse files
authored
docs: Update PR-to-production action (#3025)
* docs: Update PR-to-production action * add empty lines * Update .github/workflows/pull_request_closed.yml
1 parent 921141f commit 1876a2a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/pull_request_closed.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: Pull Request Closed
2+
23
on:
34
pull_request:
45
branches: [master]
56
types: [closed]
7+
68
jobs:
79
cherry_pick:
810
if: ${{github.event.pull_request.merged == true}}
911
runs-on: ubuntu-22.04
1012
steps:
1113
- name: Should create PR to production?
12-
uses: peter-evans/find-comment@v1
14+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
1315
id: fc
1416
with:
1517
issue-number: ${{github.event.number}}
@@ -39,26 +41,22 @@ jobs:
3941
echo "##[set-output name=branch;]$(echo ${BRANCH_NAME})"
4042
- name: Failed cherry-pick
4143
if: ${{ failure() }}
42-
uses: peter-evans/create-or-update-comment@v1
44+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
4345
with:
4446
issue-number: ${{github.event.number}}
4547
body: |
4648
Automatic cherry-pick & PR to production failed. Ping @telerik/blazor-admins for manual cherry-pick and push to production.
4749
- name: pull-request
4850
id: pr
4951
if: steps.fc.outputs.comment-id != ''
50-
uses: repo-sync/pull-request@v2
52+
uses: actions/checkout@v3
5153
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."
5957
- name: Post PR link
6058
if: steps.pr.outputs.pr_url != ''
61-
uses: peter-evans/create-or-update-comment@v1
59+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
6260
with:
6361
issue-number: ${{github.event.number}}
6462
body: |

0 commit comments

Comments
 (0)