Coder Social home page Coder Social logo

pygit-bulk's Introduction

Git Bulk operations

Actions Status

Git remote (GitHub, GitLab) API utilities for managing large numbers (10..1000) of users and repositories for education and institutions. For very large number of repos say 1000+, it may be more useful and fast to use the GraphQL GitHub v4 API. Input / output is often via spreadsheet, as a gateway to APIs of other services such as Blackboard. This repository helps us avoid having to use GitHub Education.

For example:

  • create repo for each team project (CreateGithubTeamRepos.py)
  • mass-add per-project collaborators (AddGithubCollab.py)
  • duplicate (mirror) lots of repos (DuplicateGithubRepos.p)

We also maintain Python-based Git utilities useful for managing large numbers of local Git repositories on a computer.

API access via:

Note: Scripts for each remote Git service are located under:

  • GitHub We have many more GitHub scripts as GitHub is more popular
  • GitLab will add more here as users desire

Popularity

An important feature in

python CountGithubForks.py username

is showing which forks of your repos have had changes "ahead of" the parent repo.


Count how many total GitHub stars a GitHub account has:

python CountGithubStars.py username

That will take a couple seconds even for large numbers of repos.

Mass duplicate GitHub repos

DuplicateGithubRepos based on spreadsheet input, mass duplicate GitHub repos.

API Key

Users will need a GitHub API token, as the unauthenticated API access is severely limited.

  1. Generate GitHub API token with permission appropriate to the PyGitHub Utilities script being used.
  2. Copy that text string to a secure location on your computer.

permissions

For public repos, "public_repo" is needed. For private repos, "repo" is needed.

"admin:org" Oauth does not work.

It's suggested you create an Oauth key for this, and then disable/delete this key permissions when done to avoid a security issue. To do this, including for Organizations, go to your Username, Settings, Developer Settings, Personal Access Tokens and set repo:public_repo. For organization private repos, you need "repo" permissions on the Oauth token.

if you get error

github.GithubException.UnknownObjectException: 404 {'message': 'Not Found',
'documentation_url': 'https://developer.github.com/v3/repos/#edit'}

that typically means your Oauth key doesn't have adequate permissions.

pygit-bulk's People

Contributors

scivision avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.