Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JayantGoel001/6843337996fb04a8f2ce298304835f92 to your computer and use it in GitHub Desktop.
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.
<!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