mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
fix(.github/workflows/contrib): use @actions/github instead of @octokit/rest in community-label job (#24343)
This commit is contained in:
@@ -49,8 +49,8 @@ jobs:
|
||||
# token is scoped to members: read only and used via a
|
||||
# separate Octokit client for the membership check.
|
||||
script: |
|
||||
const { Octokit } = require("@octokit/rest")
|
||||
const orgClient = new Octokit({ auth: process.env.APP_TOKEN })
|
||||
const { getOctokit } = require("@actions/github")
|
||||
const orgClient = getOctokit(process.env.APP_TOKEN)
|
||||
|
||||
const params = {
|
||||
issue_number: context.issue.number,
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
// See: https://github.com/actions/github-script/issues/643
|
||||
const author = context.payload.pull_request.user.login
|
||||
try {
|
||||
await orgClient.orgs.checkMembershipForUser({
|
||||
await orgClient.rest.orgs.checkMembershipForUser({
|
||||
org: context.repo.owner,
|
||||
username: author,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user