import { Octokit } from "https://cdn.skypack.dev/@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 admin 479 days ago
import { Octokit } from "https://cdn.skypack.dev/@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 admin 483 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts";
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
export async function main(
gh_auth: wmill.Resource<"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 adam186 609 days ago