Get a user  (github)
One script reply has been approved by the moderators

0 points by lplit 39 days ago | 25 uses

Provides publicly available information about someone with a GitHub account.

One script reply has been approved by the moderators
This version of script #144 was approved by the moderators as the one that fits the best the script ask: 'Get a user'. It is safe to use in your flows in production.
0 points
by lplit 39 days ago
edit by lplit 39 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
import { Octokit } from "https://cdn.skypack.dev/octokit?dts";

/*
@param: {wmill.Resource<"github">} gh_auth - Resource containing Github Auth API Key
Example:
{
  auth: github_api_key
}
*/
export async function main(
  gh_auth: wmill.Resource<"github">,
  username: string,
) {
  const octokit = new Octokit(gh_auth);
  const response = await octokit.rest.users.getByUsername({
    username: username,
  });

  return response;
}
edit/run in windmill raw embed