Created
December 12, 2012 15:52
-
-
Save rodrigopinto/4268887 to your computer and use it in GitHub Desktop.
Remove collaborator from all repos on codeplane!!!
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
# encoding: utf-8 | |
require 'codeplane' | |
Codeplane.configure do |config| | |
config.username = ENV['username'] | |
config.api_key = ENV['cp_api_key'] | |
end | |
cp = Codeplane::Client.new | |
cp.repositories.all.each do |repo| | |
begin | |
repo.collaborators.remove("<user-email-here>") | |
msg = "O usuário foi removido do repositório %s" | |
rescue | |
msg = "O usuário não participa do repositório %s" | |
end | |
puts msg % "\033[0;33m#{repo.name}\033[0m" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment