Skip to content

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.

License

Notifications You must be signed in to change notification settings

darsan-in/Github-Admin

Repository files navigation

Github-Admin: Collection of GitHub CRUD Boilerplate Code

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.

Supported Platforms

Linux Windows Node JS


GitHub last commit GitHub commit activity


GitHub License GitHub Release

CodeFactor Grade


GitHub Repo stars


Table of Contents 📝

Features and Benefits ✨

  • 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.

Use Cases ✅

  • 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.

🙏🏻 Friendly Request to Users

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. 🌍💖


Installation - Step-by-Step Guide 🪜

  • Step 1: Clone this repo.
git clone https://github.com/darsan-in/Github-Admin.git
npm install
  • Step 5: Now you can run program of your choice.

Usage

  • 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();

License ©️

This project is licensed under the Apache License 2.0.

Contributing to Our Project 🤝

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!

Contact Information

For any questions, please reach out via [email protected] or LinkedIn.

Credits 🙏🏻

Special thanks to Keegan Campbell, Nick Floyd, Gregor Martynus and all maintainers of @octokit/rest for their contributions to the underlying foundation library.


Darsan at Linkedin place holder image Darsan at Youtube place holder image Darsan at NPM place holder image Darsan at Github place holder image Darsan Website


Topics

  • 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

About

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.

Topics

Resources

License

Stars

Watchers

Forks