diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e9f62833aa..923ef772479 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,7 +83,7 @@ jobs: working-directory: ./scripts - name: Create PR - uses: actions/github-script@v4.0.2 + uses: actions/github-script@v6.0.0 with: github-token: ${{secrets.YOSHI_CODE_BOT_TOKEN}} script: | @@ -92,7 +92,7 @@ jobs: const branch = 'update-discovery-artifacts-${{ steps.date.outputs.current_date }}' let prBody = `${{ steps.pr_body.outputs.change_summary }}` const prTitle = 'chore: Update discovery artifacts' - const pullRequests = await github.pulls.list({ + const pullRequests = await github.rest.pulls.list({ owner: owner, repo: repo, head: `${owner}:${branch}`, @@ -101,7 +101,7 @@ jobs: if (pullRequests.data.length === 1) { prNumber = pullRequests.data[0].number - await github.pulls.update({ + await github.rest.pulls.update({ owner: owner, repo: repo, pull_number: prNumber, @@ -110,7 +110,7 @@ jobs: }) console.log('Updated PR') } else { - const createPrResult = await github.pulls.create({ + const createPrResult = await github.rest.pulls.create({ owner: owner, repo: repo, base: 'main',