Forked from mattheath/publicize-coderwall-membership.rb
Created
July 8, 2014 02:53
-
-
Save FerPerales/a9282d6dfecbdf0b518c to your computer and use it in GitHub Desktop.
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 "github_api" | |
user = '' | |
token = '' | |
github = Github.new oauth_token: token | |
coderwall_orgs = [] | |
github.orgs.list.each do |org| | |
coderwall_orgs << org.login if org.login =~ /^coderwall/ | |
end | |
coderwall_orgs.each do |org| | |
if !github.orgs.members.member? org, user, :public => true | |
puts "Publicizing membership of #{org}" | |
github.orgs.members.publicize org, user | |
else | |
puts "Already public member of #{org}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment