Github-Admin is a streamlined collection of boilerplate code designed for performing CRUD operations on GitHub repositories. Utilizing the power of the @octokit/rest library, it simplifies tasks like creating, updating, and deleting repositories through the GitHub REST API, making repository management more efficient for developers.
- Easy Repository Creation: Quickly set up new repositories with minimal configuration.
- Effortless Updates: Seamlessly update repository details such as name, description, and visibility.
- Repository Deletion: Safely delete repositories you no longer need.
- Listing Repositories: Retrieve a comprehensive list of repositories associated with your GitHub account.
- File Management: Create, read, and delete files within a repository effortlessly.
- Secret Management: Securely manage and add secrets to repositories.
- Workflow Automation: Trigger workflows and manage permissions for GitHub Actions.
- Automated Repository Management: Integrate Github-Admin into CI/CD pipelines to automate repository setup and teardown.
- Project Bootstrapping: Quickly create and configure repositories for new projects.
- Repository Cleanup: Automate the deletion of obsolete or unused repositories.
- Bulk Updates: Efficiently apply updates to multiple repositories in one go.
- GitHub Organization Management: Manage repositories within GitHub organizations with ease.
- Custom Tools Development: Use Github-Admin as a foundation for building custom GitHub management tools.
Every star on this repository is a sign of encouragement, a vote of confidence, and a reminder that our work is making a difference. If this project has brought value to you, even in the smallest way, please consider showing your support by giving it a star. ⭐
"Star" button located at the top-right of the page, near the repository name.
Your star isn’t just a digital icon—it’s a beacon that tells us we're on the right path, that our efforts are appreciated, and that this work matters. It fuels our passion and drives us to keep improving, building, and sharing.
If you believe in what we’re doing, please share this project with others who might find it helpful. Together, we can create something truly meaningful.
Thank you for being part of this journey. Your support means the world to us. 🌍💖
- Step 1: Clone this repo.
git clone https://github.com/darsan-in/Github-Admin.git
-
Step 2: Install Node JS if not installed already. Follow this page https://nodejs.org/en/download/package-manager/current
-
Step 3: Create personal access token and save it in system environment variable as
GITHUB_TOKEN
. -
Step 4: Open terminal execute this command
npm install
- Step 5: Now you can run program of your choice.
- Triggering action On all repository simultaneously.
async function main() {
const repoNames = listRepoRemote();
const ignoreList = [".github"];
let actionCount = 0;
for (const owner of Object.keys(repoMeta)) {
for (const repoName of repoMeta[owner]) {
if (!ignoreList.includes(repoName.toLowerCase())) {
try {
await triggerWorkflow(owner, repoName);
actionCount += 1;
} catch (err) {
console.log(err);
}
}
}
}
console.log("Action triggerd on ", actionCount, "repos");
}
- Add secret to all your repository simultaneously.
async function main() {
const groupedRepolists = await listRepoRemote();
Object.keys(groupedRepolists).forEach((username) => {
groupedRepolists[username].forEach((repoName) => {
addSecret(username, repoName);
});
});
}
main();
This project is licensed under the Apache License 2.0.
We’re always open to contributions and fixing issues—your help makes this project better for everyone.
If you encounter any errors or issues, please don’t hesitate to raise an issue. This ensures we can address problems quickly and improve the project.
For those who want to contribute, we kindly ask you to review our Contribution Guidelines before getting started. This helps ensure that all contributions align with the project's direction and comply with our existing license.
We deeply appreciate everyone who contributes or raises issues—your efforts are crucial to building a stronger community. Together, we can create something truly impactful.
Thank you for being part of this journey!
For any questions, please reach out via [email protected] or LinkedIn.
Special thanks to Keegan Campbell, Nick Floyd, Gregor Martynus and all maintainers of @octokit/rest for their contributions to the underlying foundation library.
- github
- repository management
- crud operations
- octokit
- rest api
- github api
- ci/cd pipelines
- github actions
- automated workflows
- team management
- access control
- permissions
- github repositories
- github rest api