Skip to content

Commit 9c83021

Browse files
authored
Infrastrucutre: Update for github-script@v5 (#2068)
Closes #2045 Addresses the breaking changes in the new octokit library https://github.com/actions/github-script#breaking-changes-in-v5
1 parent 3873e42 commit 9c83021

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/coverage-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
node test/util/report.js >> coverage.log || true
2929
3030
- name: Comment on PR
31-
uses: actions/github-script@v4.1
31+
uses: actions/github-script@v5
3232
with:
3333
github-token: ${{secrets.GITHUB_TOKEN}}
3434
script: |
@@ -39,7 +39,7 @@ jobs:
3939
return
4040
}
4141
// Get the existing comments.
42-
const {data: comments} = await github.issues.listComments({
42+
const {data: comments} = await github.rest.issues.listComments({
4343
owner: context.repo.owner,
4444
repo: context.repo.repo,
4545
issue_number: context.payload.number,
@@ -48,14 +48,14 @@ jobs:
4848
const botComment = comments.find(comment => comment.user.id === 41898282)
4949
5050
if (botComment) {
51-
await github.issues.updateComment({
51+
await github.rest.issues.updateComment({
5252
owner: context.repo.owner,
5353
repo: context.repo.repo,
5454
comment_id: botComment.id,
5555
body: commentBody
5656
})
5757
} else {
58-
await github.issues.createComment({
58+
await github.rest.issues.createComment({
5959
owner: context.repo.owner,
6060
repo: context.repo.repo,
6161
issue_number: context.payload.number,

0 commit comments

Comments
 (0)