-
-
Save wisetara/de30cb8a31a2d4a36652e957e71b5057 to your computer and use it in GitHub Desktop.
clone dbc repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
def clone_repo | |
page_num = 1 | |
loop do | |
# replace sf-grasshoppers-2015 with your cohort name | |
json = %x[curl 'https://api.github.com/orgs/sf-grasshoppers-2015/repos?per_page=100&page=#{page_num}' -u <username>:<personal_access_token>] | |
json = JSON.parse(json) | |
break if json.empty? | |
json.each { |repo| %x[git clone #{repo["ssh_url"]} ] } | |
page_num += 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment