import { Octokit } from "@octokit/rest";
type Github = {
token: string;
};
export async function main(gh_auth: Github, username: string) {
const octokit = new Octokit({ auth: gh_auth.token });
return await octokit.request("GET /users/{username}", {
username,
headers: {
"X-GitHub-Api-Version": "2022-11-28",
Accept: "application/vnd.github+json",
},
});
}
Submitted by hugo989 7 days ago