Skip to content

Instantly share code, notes, and snippets.

@mattheath
Created April 12, 2013 02:36
Show Gist options
  • Select an option

  • Save mattheath/5368857 to your computer and use it in GitHub Desktop.

Select an option

Save mattheath/5368857 to your computer and use it in GitHub Desktop.

Revisions

  1. mattheath created this gist Apr 12, 2013.
    20 changes: 20 additions & 0 deletions publicize-coderwall-membership.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    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