mirror of
https://github.com/actions/github-script.git
synced 2025-12-20 14:22:28 +00:00
Fix breaking change in workflow test
This commit is contained in:
6
.github/workflows/pull-request-test.yml
vendored
6
.github/workflows/pull-request-test.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
// Get the existing comments.
|
// Get the existing comments.
|
||||||
const {data: comments} = await github.issues.listComments({
|
const {data: comments} = await github.rest.issues.listComments({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: context.payload.number,
|
issue_number: context.payload.number,
|
||||||
@@ -28,14 +28,14 @@ jobs:
|
|||||||
console.log('Not attempting to write comment on PR from fork');
|
console.log('Not attempting to write comment on PR from fork');
|
||||||
} else {
|
} else {
|
||||||
if (botComment) {
|
if (botComment) {
|
||||||
await github.issues.updateComment({
|
await github.rest.issues.updateComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
comment_id: botComment.id,
|
comment_id: botComment.id,
|
||||||
body: commentBody
|
body: commentBody
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await github.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: context.payload.number,
|
issue_number: context.payload.number,
|
||||||
|
|||||||
Reference in New Issue
Block a user