fix(ci): use github script v6 & `rest` namespace

This commit is contained in:
Rickard Andersson 2023-08-23 21:10:01 +03:00
parent 7c918eb7ee
commit b7ba8927a2
1 changed files with 2 additions and 2 deletions

View File

@ -96,13 +96,13 @@ jobs:
- name: Deploy to Vercel - name: Deploy to Vercel
run: yarn vercel deploy --prebuilt --token ${{ secrets.vercel_token }} > _vercel-deployment-url run: yarn vercel deploy --prebuilt --token ${{ secrets.vercel_token }} > _vercel-deployment-url
- name: Comment on PR with deployment URL - name: Comment on PR with deployment URL
uses: actions/github-script@v4 uses: actions/github-script@v6
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
script: | script: |
const fs = require('fs'); const fs = require('fs');
const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8'); const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8');
github.issues.createComment({ await github.rest.issues.createComment({
issue_number: context.issue.number, issue_number: context.issue.number,
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,