|
13 | 13 | steps: |
14 | 14 | - name: Gather Info |
15 | 15 | id: check |
16 | | - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 |
| 16 | + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 |
17 | 17 | with: |
18 | 18 | script: | |
19 | 19 | const { data: pr } = await github.rest.pulls.get({ |
@@ -59,20 +59,24 @@ jobs: |
59 | 59 |
|
60 | 60 | - name: Sync Author |
61 | 61 | if: steps.check.outputs.has_assignees == 'false' |
62 | | - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 |
| 62 | + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 |
63 | 63 | with: |
64 | 64 | script: | |
65 | | - await github.rest.issues.addAssignees({ |
66 | | - owner: context.repo.owner, |
67 | | - repo: context.repo.repo, |
68 | | - issue_number: context.payload.pull_request.number, |
69 | | - assignees: ['${{ steps.check.outputs.author }}'] |
70 | | - }); |
| 65 | + try { |
| 66 | + await github.rest.issues.addAssignees({ |
| 67 | + owner: context.repo.owner, |
| 68 | + repo: context.repo.repo, |
| 69 | + issue_number: context.payload.pull_request.number, |
| 70 | + assignees: ['${{ steps.check.outputs.author }}'] |
| 71 | + }); |
71 | 72 |
|
72 | | - console.log('Assigned PR author: ${{ steps.check.outputs.author }}'); |
| 73 | + console.log('Assigned PR author: ${{ steps.check.outputs.author }}'); |
| 74 | + } catch (err) { |
| 75 | + console.warn("Error assigning author:", err); |
| 76 | + } |
73 | 77 |
|
74 | 78 | - name: Sync Labels |
75 | | - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 |
| 79 | + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 |
76 | 80 | with: |
77 | 81 | script: | |
78 | 82 | const newLabels = ${{ steps.check.outputs.labels }}; |
|
0 commit comments