Created by lplit 162 days ago Viewed 26 times 0 Points
Note: Description borrowed from official documentation at https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/master/docs/orgs/removeMember.md)
Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
No comments yet
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">,
organization: string,
username: string,
) {
const octokit = new Octokit(gh_auth);
const response = await octokit.rest.orgs.removeMember({
org: organization,
username: username
});
return response;
}
No comments yet