Consider triagers team when finding issues needing responses (#25554)

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-02-25 05:58:37 -05:00 committed by GitHub
parent 86283f4e3d
commit 3a041cac72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,14 +24,28 @@ async function main() {
const owner = "zed-industries"; const owner = "zed-industries";
const repo = "zed"; const repo = "zed";
const staff = await octokit.paginate(octokit.rest.teams.listMembersInOrg, { const teams = ["staff", "triagers"];
const githubHandleSet = new Set();
for (const team of teams) {
const teamMembers = await octokit.paginate(
octokit.rest.teams.listMembersInOrg,
{
org: owner, org: owner,
team_slug: "staff", team_slug: team,
per_page: 100, per_page: 100,
}); },
let staffHandles = staff.map((member) => member.login); );
let commenterFilters = staffHandles.map((name) => `-commenter:${name}`);
let authorFilters = staffHandles.map((name) => `-author:${name}`); for (const teamMember of teamMembers) {
githubHandleSet.add(teamMember.login);
}
}
const githubHandles = Array.from(githubHandleSet);
githubHandles.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
const commenterFilters = githubHandles.map((name) => `-commenter:${name}`);
const authorFilters = githubHandles.map((name) => `-author:${name}`);
const q = [ const q = [
`repo:${owner}/${repo}`, `repo:${owner}/${repo}`,
@ -48,8 +62,8 @@ async function main() {
per_page: 100, per_page: 100,
}); });
let issues = response.data.items; const issues = response.data.items;
let issueLines = issues.map((issue, index) => { const issueLines = issues.map((issue, index) => {
const formattedDate = new Date(issue.created_at).toLocaleDateString( const formattedDate = new Date(issue.created_at).toLocaleDateString(
"en-US", "en-US",
{ {