Last active
January 18, 2022 13:14
-
-
Save JayantGoel001/6843337996fb04a8f2ce298304835f92 to your computer and use it in GitHub Desktop.
Set Public Visibility of An Organization by putting Your GitHub Personal Token, your Username, and the Organization Name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Set Public Visibility Of An Organization.</title> | |
</head> | |
<body> | |
<script type="module"> | |
import { Octokit } from "https://cdn.skypack.dev/@octokit/core" | |
const octokit = new Octokit({ auth: `<------Put Here Your GitHub Personal Access Token----->` }); | |
//Example - const octokit = new Octokit({ auth: `123456789asdfghjkl` }); | |
const organizationName = '<--Put The Organization Name Here-->'; | |
//Example - const organizationName = 'EpicGames'; | |
const userName = '<--Put Your UserName Here-->'; | |
//Example - const UserName = 'JayantGoel001'; | |
async function start() { | |
await octokit.request('PUT /orgs/{org}/public_members/{username}',{ | |
org:organizationName, | |
username:userName | |
}) | |
} | |
start(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment