Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Created December 12, 2012 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrigopinto/4268887 to your computer and use it in GitHub Desktop.
Save rodrigopinto/4268887 to your computer and use it in GitHub Desktop.
Remove collaborator from all repos on codeplane!!!
# 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