{"id":18076212,"url":"https://github.com/scivision/pygit-bulk","last_synced_at":"2025-04-12T08:12:12.933Z","repository":{"id":62580636,"uuid":"151355096","full_name":"scivision/pygit-bulk","owner":"scivision","description":"manage large numbers (100+) Git users / teams using GitHub API v3 and PyGitHub","archived":false,"fork":false,"pushed_at":"2024-07-10T14:06:18.000Z","size":175,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T22:47:43.113Z","etag":null,"topics":["github-api","github-education","pygithub"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scivision.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-03T03:17:45.000Z","updated_at":"2025-03-06T00:03:45.000Z","dependencies_parsed_at":"2022-11-03T20:14:46.914Z","dependency_job_id":null,"html_url":"https://github.com/scivision/pygit-bulk","commit_stats":null,"previous_names":["scivision/pygithub-utils"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fpygit-bulk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fpygit-bulk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fpygit-bulk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fpygit-bulk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scivision","download_url":"https://codeload.github.com/scivision/pygit-bulk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312197,"owners_count":21082637,"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":["github-api","github-education","pygithub"],"created_at":"2024-10-31T11:09:14.981Z","updated_at":"2025-04-12T08:12:12.905Z","avatar_url":"https://github.com/scivision.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Bulk operations\n\n![Actions Status](https://github.com/scivision/pygit-bulk/workflows/ci/badge.svg)\n\nGit remote (GitHub, GitLab) API utilities for managing large numbers (10..1000) of users and repositories for education and institutions.\nFor very large number of repos say 1000+, it may be more useful and fast to use the GraphQL GitHub v4 API.\nInput / output is often via spreadsheet, as a gateway to APIs of other services such as Blackboard.\nThis repository helps us avoid having to use\n[GitHub Education](https://education.github.com/).\n\nFor example:\n\n* create repo for each team project (CreateGithubTeamRepos.py)\n* mass-add per-project collaborators (AddGithubCollab.py)\n* duplicate (mirror) lots of repos (DuplicateGithubRepos.p)\n\nWe also maintain Python-based Git\n[utilities](https://github.com/scivision/gitmc)\nuseful for managing large numbers of local Git repositories on a computer.\n\nAPI access via:\n\n* GitHub v3 API: [PyGithub](https://pypi.org/project/PyGithub/)\n* GitLab v4 API: [Python-Gitlab](https://python-gitlab.readthedocs.io/)\n\nNote: Scripts for each remote Git service are located under:\n\n* [GitHub](./Github) We have many more GitHub scripts as GitHub is more popular\n* [GitLab](./Gitlab) will add more here as users desire\n\n## Popularity\n\nAn important feature in\n\n```sh\npython CountGithubForks.py username\n```\nis showing which forks of your repos have had changes \"ahead of\" the parent repo.\n\n---\n\nCount how many total GitHub stars a GitHub account has:\n\n```sh\npython CountGithubStars.py username\n```\n\nThat will take a couple seconds even for large numbers of repos.\n\n\n## Mass duplicate GitHub repos\n\n`DuplicateGithubRepos`\nbased on spreadsheet input, mass duplicate GitHub repos.\n\n## API Key\n\nUsers will need a GitHub API token, as the unauthenticated API access is severely limited.\n\n1. [Generate](https://github.com/settings/tokens) GitHub API token with permission appropriate to the PyGitHub Utilities script being used.\n2. Copy that text string to a secure location on your computer.\n\n### permissions\n\nFor public repos, \"public_repo\" is needed.\nFor private repos, \"repo\" is needed.\n\n\"admin:org\" Oauth does not work.\n\nIt's suggested you create an Oauth key for this, and then disable/delete this key permissions when done\nto avoid a security issue.\nTo do this, including for Organizations, go to your\nUsername, Settings, Developer Settings, Personal Access Tokens and set repo:public_repo.\nFor organization private repos, you need \"repo\" permissions on the Oauth token.\n\nif you get error\n\n```\ngithub.GithubException.UnknownObjectException: 404 {'message': 'Not Found',\n'documentation_url': 'https://developer.github.com/v3/repos/#edit'}\n```\n\nthat typically means your Oauth key doesn't have adequate permissions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscivision%2Fpygit-bulk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscivision%2Fpygit-bulk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscivision%2Fpygit-bulk/lists"}