diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index c3b4ccd..3a1bcc2 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -14,12 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Artifact - uses: actions/github-script@v4.1 + uses: actions/github-script@v5 with: script: | const fs = require('fs'); - const artifacts = await github.actions.listWorkflowRunArtifacts({ + const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, run_id: ${{ github.event.workflow_run.id }}, @@ -28,7 +28,7 @@ jobs: return artifact.name == 'pr'; })[0]; - const download = await github.actions.downloadArtifact({ + const download = await github.rest.actions.downloadArtifact({ owner: context.repo.owner, repo: context.repo.repo, artifact_id: matchArtifact.id, @@ -38,14 +38,14 @@ jobs: fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - run: unzip pr.zip - name: Comment on PR - uses: actions/github-script@v4.1 + uses: actions/github-script@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); const pull_number = Number(fs.readFileSync('./NR')); - await github.pulls.merge({ + await github.rest.pulls.merge({ merge_method: "merge", owner: context.repo.owner, repo: context.repo.repo,