Skip to content

Commit bf5648a

Browse files
[Github] Bump actions script version to v7 (#131471)
This patch bumps the actions script version in the issue-write workflow to v7. This was done before but rolled back due to errors as there were breaking changes in v5 (https://github.com/actions/github-script#breaking-changes-in-v5). This was reverted in f984b47. This patch makes the necessary changes to prevent job failures. Fixes #130211.
1 parent f1ac2af commit bf5648a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/issue-write.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: 'Comment on PR'
4141
if: steps.download-artifact.outputs.artifact-id != ''
42-
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
42+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4343
with:
4444
github-token: ${{ secrets.GITHUB_TOKEN }}
4545
script: |
@@ -49,7 +49,7 @@ jobs:
4949
return;
5050
}
5151
52-
let runInfo = await github.actions.getWorkflowRun({
52+
let runInfo = await github.rest.actions.getWorkflowRun({
5353
owner: context.repo.owner,
5454
repo: context.repo.repo,
5555
run_id: context.payload.workflow_run.id
@@ -122,7 +122,7 @@ jobs:
122122
// Security check: Ensure that this comment was created by
123123
// the github-actions bot, so a malicious input won't overwrite
124124
// a user's comment.
125-
github.issues.getComment({
125+
github.rest.issues.getComment({
126126
owner: context.repo.owner,
127127
repo: context.repo.repo,
128128
comment_id: comment.id
@@ -132,7 +132,7 @@ jobs:
132132
console.log("Invalid comment id: " + comment.id);
133133
return;
134134
}
135-
github.issues.updateComment({
135+
github.rest.issues.updateComment({
136136
owner: context.repo.owner,
137137
repo: context.repo.repo,
138138
issue_number: pr_number,
@@ -141,7 +141,7 @@ jobs:
141141
});
142142
});
143143
} else {
144-
github.issues.createComment({
144+
github.rest.issues.createComment({
145145
owner: context.repo.owner,
146146
repo: context.repo.repo,
147147
issue_number: pr_number,

0 commit comments

Comments
 (0)