Skip to content

Instantly share code, notes, and snippets.

@lin-brian-l
lin-brian-l / download-repos.rb
Last active December 2, 2021 03:05
Clone all repos within an organization and pull all branches.
# Run 'gem install octokit' in terminal first
# 'getAllBranches.sh' and 'download-repos.rb' should be in the same directory.
# Run this file using 'ruby download-repos.rb' in your terminal.
# Organization name can be changed on line 29.
# Credits to @klkelley for writing the code upon which this was based (https://gist.github.com/klkelley/20fe2c35836110589966edd82772f5ca)
require 'Octokit'
require 'io/console'
def get_username