import * as wmill from "https://deno.land/x/windmill@v1.34.0/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">,
organizationName: string,
username: string,
) {
const octokit = new Octokit(gh_auth);
const response = await octokit.rest.orgs.blockUser({
org: organizationName,
username: username,
});
return response;
}
Submitted by lplit 992 days ago