1 | import * as wmill from "https://deno.land/x/windmill@v1.34.0/mod.ts"; |
2 | import { Octokit } from "https://cdn.skypack.dev/octokit?dts"; |
3 |
|
4 |
|
5 | @param: {wmill.Resource<"github">} gh_auth - Resource containing Github Auth API Key |
6 | example: |
7 | { |
8 | auth: github_api_key |
9 | } |
10 | */ |
11 |
|
12 | export async function main( |
13 | gh_auth: wmill.Resource<"github">, |
14 | organizationName: string, |
15 | username: string, |
16 | ) { |
17 | const octokit = new Octokit(gh_auth); |
18 | const response = await octokit.rest.orgs.blockUser({ |
19 | org: organizationName, |
20 | username: username, |
21 | }); |
22 |
|
23 | return response; |
24 | } |
25 |
|