Skip to content

Commit 7e68d18

Browse files
authored
fix(.github/workflows/contrib): use @actions/github instead of @octokit/rest in community-label job (#24343)
1 parent 214351e commit 7e68d18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/contrib.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
# token is scoped to members: read only and used via a
5050
# separate Octokit client for the membership check.
5151
script: |
52-
const { Octokit } = require("@octokit/rest")
53-
const orgClient = new Octokit({ auth: process.env.APP_TOKEN })
52+
const { getOctokit } = require("@actions/github")
53+
const orgClient = getOctokit(process.env.APP_TOKEN)
5454
5555
const params = {
5656
issue_number: context.issue.number,
@@ -71,7 +71,7 @@ jobs:
7171
// See: https://github.com/actions/github-script/issues/643
7272
const author = context.payload.pull_request.user.login
7373
try {
74-
await orgClient.orgs.checkMembershipForUser({
74+
await orgClient.rest.orgs.checkMembershipForUser({
7575
org: context.repo.owner,
7676
username: author,
7777
})

0 commit comments

Comments
 (0)