From e5d8bd27da9262c1c467faee4b6b97987a9dd91d Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Tue, 18 Feb 2025 13:43:37 -0500 Subject: [PATCH] Issue response: pull team members from staff team (#25102) Release Notes: - N/A --- .github/workflows/issue_response.yml | 2 +- script/issue_response/main.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue_response.yml b/.github/workflows/issue_response.yml index f45ee7c4cf..d18b66fe47 100644 --- a/.github/workflows/issue_response.yml +++ b/.github/workflows/issue_response.yml @@ -29,5 +29,5 @@ jobs: - name: Run Issue Response run: pnpm run --dir script/issue_response start env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_RESPONSE_GITHUB_TOKEN: ${{ secrets.ISSUE_RESPONSE_GITHUB_TOKEN }} SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }} diff --git a/script/issue_response/main.js b/script/issue_response/main.js index da6cc1eb34..783eea5187 100644 --- a/script/issue_response/main.js +++ b/script/issue_response/main.js @@ -9,7 +9,9 @@ import { IncomingWebhook } from "@slack/webhook"; const SECTION_BLOCK_TEXT_LIMIT = 3000; async function main() { - const octokit = new Octokit({ auth: process.env["GITHUB_TOKEN"] }); + const octokit = new Octokit({ + auth: process.env["ISSUE_RESPONSE_GITHUB_TOKEN"], + }); if (!process.env["SLACK_ISSUE_RESPONSE_WEBHOOK_URL"]) { throw new Error("SLACK_ISSUE_RESPONSE_WEBHOOK_URL is not set"); @@ -21,8 +23,9 @@ async function main() { const owner = "zed-industries"; const repo = "zed"; - const staff = await octokit.paginate(octokit.rest.orgs.listMembers, { + const staff = await octokit.paginate(octokit.rest.teams.listMembersInOrg, { org: owner, + team_slug: "staff", per_page: 100, }); let staffHandles = staff.map((member) => member.login);