Code Monkey home page Code Monkey logo

mass_clone's Introduction

mass_clone

This is a shell script that will clone multiple repositories. The intended usage is for GitHub Classroom to be able to clone all repos of a certain assignment. The script will create a folder based on the identifier(assignment name) then make folders for each repo then clone. Uses GitHub api v3, curl 7.49.1 and grep 2.5.1

clone_all.sh

This script takes 4 arguments in order to clone repos based on organization(github classroom), a unique identifier(assignment), username, and protocol.

This script will make a new folder based on the unique identifier, then clone each to their own subfolder.

If you would like to have osx remember your credentials to use https: https://help.github.com/articles/caching-your-github-password-in-git/

If you would like to setup an ssh key: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

If you are running windows, here is a stack post that may help with ssh: https://stackoverflow.com/questions/18404272/running-ssh-agent-when-starting-git-bash-on-windows

push_all.sh

Adds all files, commits, then pushes all changes.

Takes 1 argument, the unique identifier(folder containing repos)

Used the commit message "Graded", but can be changed.

clone_all_helper.sh

This script runs clone_all.sh with three arguments as defaults, Organization, username, and protocol

The script takes one argument, the unique identifier.

mass_clone's People

Contributors

jfiksel avatar konzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mass_clone's Issues

Not cloning all repositories

I'm trying to use the clone_all_helper_example.sh script to mass clone repositories from my organization. However, it seems to max out at 36 repositories, when there are much more. Is there a way to bypass this limit?

add license?

thank you for this tool!

I might end up making my own ad hoc collection of github classroom scripts & for convenience was thinking of storing your clone_all.sh in that collection. Are you willing to put up a license so I can be sure not to break it? Thanks!

Error with more than 2 pages of repos / Line 52

Line 52 should be:
numRepos=$(echo "$tempJSON" | grep -o "full_name" | wc -l)
not:
numRepos=$(echo "$rawJSON" | grep -o "full_name" | wc -l)

I.e., if there are 100 repos in the current page (not 100 total, which would always stop at 2 pages)
Bill

Additional feature: mass commit

Hi, first of all, thanks for putting together these scripts, I find them more useful than the official Classroom Assistant.

However, I found that I needed some more flexibility when evaluating students' submissions - these can be pretty lengthy and consist of several separate parts, so for example, if one wants to grade them part-wise, it only makes sense to be able to commit more than just once before pushing changes to remote. I hope I'm getting my point across well enough :)

With this in mind, I separated the original push_all.sh into commit-all.sh and push_all.sh. I also included the if-else check for whether a directory contains non-git repos and files, which are then skipped - this is useful to me because I want to keep test files and results statistics in the same directory.
Lastly, I added the option to use a remote different than origin when pushing changes, although this is not likely to be used very often.

If you think these changes could be useful, I will create a pull request.

Cheers,
Anamaria

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.