Created
November 20, 2013 23:19
-
-
Save andrew/7573017 to your computer and use it in GitHub Desktop.
Follow everyone in all orgs that you're a member of
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' | |
# usage: $ ACCESS_TOKEN=1234567890abcdef ruby followbomb.rb | |
# create a token here: https://github.com/settings/tokens/new | |
client = Octokit::Client.new :access_token => ENV['ACCESS_TOKEN'] | |
puts "Loading members of all orgs" | |
members = client.orgs.map{|org| client.organization_members(org.login) }.flatten.map(&:login) | |
puts "Found #{members.length} members (#{members.uniq.length} unique)" | |
members = members.uniq.sort | |
members.each do |m| | |
puts "Following #{m}" | |
client.follow(m) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment