{"id":22788492,"url":"https://github.com/darsan-in/github-admin","last_synced_at":"2025-04-16T01:28:36.003Z","repository":{"id":251551925,"uuid":"837736540","full_name":"darsan-in/Github-Admin","owner":"darsan-in","description":"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.","archived":false,"fork":false,"pushed_at":"2024-11-10T07:36:52.000Z","size":52,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T22:46:56.046Z","etag":null,"topics":["access-control","automated-workflows","ci-cd-pipelines","crud-operations","github","github-actions","github-api","github-repositories","github-rest-api","octokit","permissions","repository-management","rest-api","team-management"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darsan-in.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-03T21:44:55.000Z","updated_at":"2024-12-04T16:44:20.000Z","dependencies_parsed_at":"2024-08-03T23:27:32.895Z","dependency_job_id":null,"html_url":"https://github.com/darsan-in/Github-Admin","commit_stats":null,"previous_names":["iamspdarsan/github-admin","darsan-in/github-admin"],"tags_count":2,"template":false,"template_full_name":"darsan-in/Template-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darsan-in%2FGithub-Admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darsan-in%2FGithub-Admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darsan-in%2FGithub-Admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darsan-in%2FGithub-Admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darsan-in","download_url":"https://codeload.github.com/darsan-in/Github-Admin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249181938,"owners_count":21225978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-control","automated-workflows","ci-cd-pipelines","crud-operations","github","github-actions","github-api","github-repositories","github-rest-api","octokit","permissions","repository-management","rest-api","team-management"],"created_at":"2024-12-12T01:31:47.357Z","updated_at":"2025-04-16T01:28:35.981Z","avatar_url":"https://github.com/darsan-in.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\r\n\r\n# Github-Admin: Collection of GitHub CRUD Boilerplate Code\r\n\r\n\u003cp id=\"intro\"\u003eGithub-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.\u003c/p\u003e\r\n\r\n### Supported Platforms\r\n\r\n[![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black)]()\r\n[![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\u0026logo=windows\u0026logoColor=white)]()\r\n[![Node JS](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge\u0026logo=node.js\u0026logoColor=white)]()\r\n\r\n---\r\n\r\n\u003cp\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003ca href=\"https://github.com/darsan-in/Github-Admin/commits/main\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/last-commit/darsan-in/Github-Admin?display_timestamp=committer\u0026style=for-the-badge\u0026label=Updated%20On\" alt=\"GitHub last commit\"/\u003e\r\n  \u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003ca href=\"\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/commit-activity/m/darsan-in/Github-Admin?style=for-the-badge\u0026label=Commit%20Activity\" alt=\"GitHub commit activity\"/\u003e\r\n  \u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003c/p\u003e\r\n\r\n---\r\n\r\n\u003cp\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003ca href=\"LICENSE\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/license/darsan-in/Github-Admin?style=for-the-badge\u0026label=License\" alt=\"GitHub License\"/\u003e\r\n  \u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003ca href=\"https://github.com/darsan-in/Github-Admin/releases\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/v/release/darsan-in/Github-Admin?include_prereleases\u0026sort=date\u0026display_name=tag\u0026style=for-the-badge\u0026label=Latest%20Version\" alt=\"GitHub Release\"/\u003e\r\n  \u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003ca href=\"https://www.codefactor.io/repository/github/darsan-in/Github-Admin/issues/main\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/codefactor/grade/github/darsan-in/Github-Admin?style=for-the-badge\u0026label=Code%20Quality%20Grade\" alt=\"CodeFactor Grade\"/\u003e\r\n  \u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003c/p\u003e\r\n\r\n---\r\n\r\n\u003cp\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003ca href=\"\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/stars/darsan-in/Github-Admin?style=for-the-badge\u0026label=Stars\" alt=\"GitHub Repo stars\"/\u003e\r\n  \u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003c/p\u003e\r\n\r\n---\r\n\r\n\u003c/div\u003e\r\n\r\n## Table of Contents 📝\r\n\r\n- [Features and Benefits](#features-and-benefits-)\r\n- [Use Cases](#use-cases-)\r\n- [Friendly request to users](#-friendly-request-to-users)\r\n\r\n- [Installation - Step-by-Step Guide](#installation---step-by-step-guide-)\r\n- [Usage](#usage)\r\n\r\n- [License](#license-%EF%B8%8F)\r\n- [Contributing to Our Project](#contributing-to-our-project-)\r\n\r\n- [Contact Information](#contact-information)\r\n- [Credits](#credits-)\r\n\r\n## Features and Benefits ✨\r\n\r\n- **Easy Repository Creation**: Quickly set up new repositories with minimal configuration.\r\n- **Effortless Updates**: Seamlessly update repository details such as name, description, and visibility.\r\n- **Repository Deletion**: Safely delete repositories you no longer need.\r\n- **Listing Repositories**: Retrieve a comprehensive list of repositories associated with your GitHub account.\r\n- **File Management**: Create, read, and delete files within a repository effortlessly.\r\n- **Secret Management**: Securely manage and add secrets to repositories.\r\n- **Workflow Automation**: Trigger workflows and manage permissions for GitHub Actions.\r\n\r\n## Use Cases ✅\r\n\r\n- **Automated Repository Management**: Integrate Github-Admin into CI/CD pipelines to automate repository setup and teardown.\r\n- **Project Bootstrapping**: Quickly create and configure repositories for new projects.\r\n- **Repository Cleanup**: Automate the deletion of obsolete or unused repositories.\r\n- **Bulk Updates**: Efficiently apply updates to multiple repositories in one go.\r\n- **GitHub Organization Management**: Manage repositories within GitHub organizations with ease.\r\n- **Custom Tools Development**: Use Github-Admin as a foundation for building custom GitHub management tools.\r\n\r\n---\r\n\r\n### 🙏🏻 Friendly Request to Users\r\n\r\nEvery 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.** ⭐\r\n\r\n_\"Star\" button located at the top-right of the page, near the repository name._\r\n\r\nYour 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.\r\n\r\nIf 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.\r\n\r\nThank you for being part of this journey. Your support means the world to us. 🌍💖\r\n\r\n---\r\n\r\n## Installation - Step-by-Step Guide 🪜\r\n\r\n- **Step 1:** Clone this repo.\r\n\r\n```bash\r\ngit clone https://github.com/darsan-in/Github-Admin.git\r\n```\r\n\r\n- **Step 2:** Install Node JS if not installed already. Follow this page https://nodejs.org/en/download/package-manager/current\r\n\r\n- **Step 3:** Create [personal access token](https://github.com/settings/tokens) and save it in system environment variable as `GITHUB_TOKEN`.\r\n\r\n- **Step 4:** Open terminal execute this command\r\n\r\n```bash\r\nnpm install\r\n```\r\n\r\n- **Step 5:** Now you can run program of your choice.\r\n\r\n## Usage\r\n\r\n- **Triggering action On all repository simultaneously.**\r\n\r\n```js\r\nasync function main() {\r\n  const repoNames = listRepoRemote();\r\n\r\n  const ignoreList = [\".github\"];\r\n\r\n  let actionCount = 0;\r\n\r\n  for (const owner of Object.keys(repoMeta)) {\r\n    for (const repoName of repoMeta[owner]) {\r\n      if (!ignoreList.includes(repoName.toLowerCase())) {\r\n        try {\r\n          await triggerWorkflow(owner, repoName);\r\n\r\n          actionCount += 1;\r\n        } catch (err) {\r\n          console.log(err);\r\n        }\r\n      }\r\n    }\r\n  }\r\n  console.log(\"Action triggerd on \", actionCount, \"repos\");\r\n}\r\n```\r\n\r\n- **Add secret to all your repository simultaneously.**\r\n\r\n```js\r\nasync function main() {\r\n  const groupedRepolists = await listRepoRemote();\r\n\r\n  Object.keys(groupedRepolists).forEach((username) =\u003e {\r\n    groupedRepolists[username].forEach((repoName) =\u003e {\r\n      addSecret(username, repoName);\r\n    });\r\n  });\r\n}\r\n\r\nmain();\r\n```\r\n\r\n## License ©️\r\n\r\nThis project is licensed under the [Apache License 2.0](LICENSE).\r\n\r\n## Contributing to Our Project 🤝\r\n\r\nWe’re always open to contributions and fixing issues—your help makes this project better for everyone.\r\n\r\nIf you encounter any errors or issues, please don’t hesitate to [raise an issue](../../issues/new). This ensures we can address problems quickly and improve the project.\r\n\r\nFor those who want to contribute, we kindly ask you to review our [Contribution Guidelines](CONTRIBUTING) before getting started. This helps ensure that all contributions align with the project's direction and comply with our existing [license](LICENSE).\r\n\r\nWe deeply appreciate everyone who contributes or raises issues—your efforts are crucial to building a stronger community. Together, we can create something truly impactful.\r\n\r\nThank you for being part of this journey!\r\n\r\n## Contact Information\r\n\r\nFor any questions, please reach out via hello@darsan.in or [LinkedIn](https://www.linkedin.com/in/darsan-in/).\r\n\r\n## Credits 🙏🏻\r\n\r\nSpecial thanks to [Keegan Campbell](https://github.com/kfcampbell), [Nick Floyd](https://github.com/nickfloyd), [Gregor Martynus](https://github.com/gr2m) and all maintainers of @octokit/rest for their contributions to the underlying foundation library.\r\n\r\n---\r\n\r\n\u003cp align=\"center\"\u003e\r\n\r\n\u003cspan\u003e\r\n\u003ca href=\"https://www.linkedin.com/in/darsan-in/\"\u003e\u003cimg width='45px' height='45px' src=\"https://darsan.in/readme-src/footer-icons/linkedin.png\" alt=\"Darsan at Linkedin\"\u003e\u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003cimg width='20px' height='20px' src=\"https://darsan.in/readme-src/footer-icons/gap.png\" alt=\"place holder image\"\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n\u003ca href=\"https://www.youtube.com/@darsan-in\"\u003e\u003cimg width='45px' height='45px' src=\"https://darsan.in/readme-src/footer-icons/youtube.png\" alt=\"Darsan at Youtube\"\u003e\u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003cimg width='20px' height='20px' src=\"https://darsan.in/readme-src/footer-icons/gap.png\" alt=\"place holder image\"\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n\u003ca href=\"https://www.npmjs.com/~darsan.in\"\u003e\u003cimg width='45px' height='45px' src=\"https://darsan.in/readme-src/footer-icons/npm.png\" alt=\"Darsan at NPM\"\u003e\u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003cimg width='20px' height='20px' src=\"https://darsan.in/readme-src/footer-icons/gap.png\" alt=\"place holder image\"\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n\u003ca href=\"https://github.com/darsan-in\"\u003e\u003cimg width='45px' height='45px' src=\"https://darsan.in/readme-src/footer-icons/github.png\" alt=\"Darsan at Github\"\u003e\u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n  \u003cimg width='20px' height='20px' src=\"https://darsan.in/readme-src/footer-icons/gap.png\" alt=\"place holder image\"\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cspan\u003e\r\n\u003ca href=\"https://darsan.in/\"\u003e\u003cimg width='45px' height='45px' src=\"https://darsan.in/readme-src/footer-icons/website.png\" alt=\"Darsan Website\"\u003e\u003c/a\u003e\r\n\u003c/span\u003e\r\n\r\n\u003cp\u003e\r\n\r\n---\r\n\r\n#### Topics\r\n\r\n\u003cul id=\"keywords\"\u003e\r\n\u003cli\u003egithub\u003c/li\u003e\r\n\u003cli\u003erepository management\u003c/li\u003e\r\n\u003cli\u003ecrud operations\u003c/li\u003e\r\n\u003cli\u003eoctokit\u003c/li\u003e\r\n\u003cli\u003erest api\u003c/li\u003e\r\n\u003cli\u003egithub api\u003c/li\u003e\r\n\u003cli\u003eci/cd pipelines\u003c/li\u003e\r\n\u003cli\u003egithub actions\u003c/li\u003e\r\n\u003cli\u003eautomated workflows\u003c/li\u003e\r\n\u003cli\u003eteam management\u003c/li\u003e\r\n\u003cli\u003eaccess control\u003c/li\u003e\r\n\u003cli\u003epermissions\u003c/li\u003e\r\n\u003cli\u003egithub repositories\u003c/li\u003e\r\n\u003cli\u003egithub rest api\u003c/li\u003e\r\n\u003c/ul\u003e\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarsan-in%2Fgithub-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarsan-in%2Fgithub-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarsan-in%2Fgithub-admin/lists"}