Created
March 22, 2012 16:08
-
-
Save newbamboo/2159238 to your computer and use it in GitHub Desktop.
Script to find all your repositories that have a particular collaborator.
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 'rubygems' | |
require 'github_api' | |
username = ARGV[0] | |
password = ARGV[1] | |
collaborator_for_deletion = ARGV[2] | |
client = Github.new(login: username, password: password) | |
repositories = client.repos.list | |
repositories.each_page do |page| | |
page.each do |repository| | |
if client.repos.collaborators.collaborator?(username, repository.name, collaborator_for_deletion) | |
puts "#{repository.name}: #{repository.html_url}/admin/collaboration" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment