Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { coaches } from "https://esm.town/v/onemanwenttomow/coaches";
import process from "node:process";
export const getGithubUsersByTeam = async (team_slug) => {
const { Octokit } = await import("npm:@octokit/core");
const octokit = new Octokit({
auth: process.env.githubToken,
});
const { data } = await octokit.request(
`GET /orgs/neuefische/teams/${team_slug}/members`,
);
const members = data.map((user) => user.login).filter((user) =>
!coaches.includes(user)
);
return members;
};
October 23, 2023