Skip to content

Commit 813f6ec

Browse files
committed
Fixing actions/github-script breaking change
1 parent 35516f7 commit 813f6ec

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/release_canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
with:
6262
script: |
6363
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
64-
github.repos.createCommitStatus({
64+
github.rest.repos.createCommitStatus({
6565
owner: context.repo.owner,
6666
repo: context.repo.repo,
6767
sha: context.sha,

.github/workflows/release_candidate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
script: |
4848
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
49-
github.repos.createCommitStatus({
49+
github.rest.repos.createCommitStatus({
5050
owner: context.repo.owner,
5151
repo: context.repo.repo,
5252
sha: context.sha,

.github/workflows/welcome.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
script: |
2323
const fs = require('fs')
2424
const body = await fs.readFileSync('.github/release_template.md', 'utf8')
25-
const result = await github.issues.listComments({
25+
const result = await github.rest.issues.listComments({
2626
issue_number: context.issue.number,
2727
owner: context.repo.owner,
2828
repo: context.repo.repo
2929
});
3030
console.log(result.data)
3131
const primerComments = result.data.filter(c => c.user.login == 'github-actions[bot]')
3232
if (!primerComments.length) {
33-
await github.issues.createComment({
33+
await github.rest.issues.createComment({
3434
issue_number: context.issue.number,
3535
owner: context.repo.owner,
3636
repo: context.repo.repo,
@@ -91,7 +91,7 @@ jobs:
9191
result-encoding: string
9292
script: |
9393
const diff_url = context.payload.pull_request.diff_url
94-
const result = await github.request(diff_url)
94+
const result = await github.rest.request(diff_url)
9595
const match = [...result.data.matchAll(/^\+['"]@primer\/css['"]:\s(patch|minor|major)/m)]
9696
if (match && match[0]) {
9797
return match[0][1]
@@ -104,7 +104,7 @@ jobs:
104104
github-token: ${{secrets.GITHUB_TOKEN}}
105105
script: |
106106
if (process.env.RELEASE == 'undefined') { return }
107-
const issue = await github.issues.get({
107+
const issue = await github.rest.issues.get({
108108
owner: context.repo.owner,
109109
repo: context.repo.repo,
110110
issue_number: context.issue.number

0 commit comments

Comments
 (0)