Skip to content

Commit

Permalink
chore: Compatibility fix for github-script (#11011)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Mar 13, 2024
1 parent 5ffbf2b commit dc534c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/update-api-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
with:
github-token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
script: |
const existing = await github.pulls.list({
const existing = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: "open",
head: context.repo.owner + ":action/auto-update-api-list"
});
if (existing.data.length == 0) {
core.info("No existing PR found.");
const result = await github.pulls.create({
const result = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "chore: Automatic update of apis.json",
Expand All @@ -66,7 +66,7 @@ jobs:
} else {
const prNumber = existing.data[0].number;
core.info("Found existing PR number " + prNumber);
await github.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
Expand Down

0 comments on commit dc534c8

Please sign in to comment.