Consider triagers team when finding issues needing responses (#25554)
Release Notes: - N/A
This commit is contained in:
parent
86283f4e3d
commit
3a041cac72
1 changed files with 24 additions and 10 deletions
|
@ -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"];
|
||||||
org: owner,
|
const githubHandleSet = new Set();
|
||||||
team_slug: "staff",
|
|
||||||
per_page: 100,
|
for (const team of teams) {
|
||||||
});
|
const teamMembers = await octokit.paginate(
|
||||||
let staffHandles = staff.map((member) => member.login);
|
octokit.rest.teams.listMembersInOrg,
|
||||||
let commenterFilters = staffHandles.map((name) => `-commenter:${name}`);
|
{
|
||||||
let authorFilters = staffHandles.map((name) => `-author:${name}`);
|
org: owner,
|
||||||
|
team_slug: team,
|
||||||
|
per_page: 100,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
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",
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue