Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created September 13, 2015 17:19
Show Gist options
  • Save kyanny/0b94ba8328cd743585c5 to your computer and use it in GitHub Desktop.
Save kyanny/0b94ba8328cd743585c5 to your computer and use it in GitHub Desktop.
require 'octokit'
def octokit; Octokit::Client.new(access_token: ENV['GITHUB_ACCESS_TOKEN']); end
def members_of(org, team); octokit.team_members(octokit.org_teams(org).detect{|t| t.slug==team}.id).map(&:login); end
(members_of('ruby-no-kai', 'rubykaigi2013-speakers') & members_of('ruby-no-kai', 'rubykaigi2014-speakers')).map{|s|s.insert(0, '@')}.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment