Created
January 22, 2016 19:35
-
-
Save afeld/456e33693bcae702a5dd to your computer and use it in GitHub Desktop.
private GitHub repositories in an organization
This file contains hidden or 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 'octokit' | |
Octokit.auto_paginate = true | |
client = Octokit::Client.new(access_token: ENV['GITHUB_TOKEN']) | |
repos = client.organization_repositories('18F') | |
private_repos = repos.select(&:private) | |
private_repos.sort_by!(&:name) | |
private_repos.each do |repo| | |
puts [ | |
repo.name, | |
repo.description | |
].compact.join(' – ') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment