Fix calling GitHub API (github.api.~ -> github.rest.~) (#2116)

This commit is contained in:
Masaya Suzuki 2021-11-12 23:53:39 +09:00 committed by GitHub
parent 897185a4aa
commit e0790b4835
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -133,7 +133,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const create = await github.api.issues.create({ const create = await github.rest.issues.create({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
title: "Failed to deploy to production", title: "Failed to deploy to production",
@ -152,7 +152,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
github.api.issues.addAssignees({ github.rest.issues.addAssignees({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: "${{ steps.create-issue.outputs.result }}", issue_number: "${{ steps.create-issue.outputs.result }}",

View file

@ -133,7 +133,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const create = await github.api.issues.create({ const create = await github.rest.issues.create({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
title: "Failed to deploy to production", title: "Failed to deploy to production",
@ -152,7 +152,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
github.api.issues.addAssignees({ github.rest.issues.addAssignees({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: "${{ steps.create-issue.outputs.result }}", issue_number: "${{ steps.create-issue.outputs.result }}",

View file

@ -167,7 +167,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const create = await github.api.issues.create({ const create = await github.rest.issues.create({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
title: "Failed to deploy release to production", title: "Failed to deploy release to production",
@ -186,7 +186,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
github.apiissues.addAssignees({ github.rest.issues.addAssignees({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: "${{ steps.create-issue.outputs.result }}", issue_number: "${{ steps.create-issue.outputs.result }}",

View file

@ -167,7 +167,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const create = await github.api.issues.create({ const create = await github.rest.issues.create({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
title: "Failed to deploy release to production", title: "Failed to deploy release to production",
@ -186,7 +186,7 @@ jobs:
# https://octokit.github.io/rest.js/v18#issues-create # https://octokit.github.io/rest.js/v18#issues-create
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
github.api.issues.addAssignees({ github.rest.issues.addAssignees({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: "${{ steps.create-issue.outputs.result }}", issue_number: "${{ steps.create-issue.outputs.result }}",