Use the GitHub API to find all private repositories owned by an organization which have license files (and hence may be granting an open source license to people who have access to the code).
- Create a GitHub personal access token. This should be made by a member of the organization who can see private repositories (e.g., a member of the
Owners
team). - Place the access token in the file
~/.github.yml
:
token: 1234567890feedfacedeadbeefcafe0987654321
- Bundle, and run the script, providing the github account name for your org:
$ bundle install --path vendor/bundler
$ bundle exec script/find-licensed-private-repos.rb your-org-name-here
You can also set the environment variable $DEBUG
if you want more verbose output during the fetch process.