Skip to content

Instantly share code, notes, and snippets.

@dstufft
Created November 5, 2018 19:59
Show Gist options
  • Save dstufft/d1bcd989c98907229097ee15661dc1c5 to your computer and use it in GitHub Desktop.
Save dstufft/d1bcd989c98907229097ee15661dc1c5 to your computer and use it in GitHub Desktop.
from github3 import login
gh = login(token="...")
python = gh.organization("python")
for team in python.teams():
if team.slug == "python-core":
core_developers = team
break
else:
raise RuntimeError("Could not find core team.")
emails = {}
for member in core_developers.members():
member = gh.user(member.login)
emails[member.login] = member.email
for username, email in sorted(emails.items(), key=lambda i: i[0].lower()):
if email:
print(f"{username},{email}")
else:
print(f"{username},")
print("")
print("")
print("")
print("")
print("Emails needed for:")
for username, email in sorted(emails.items(), key=lambda i: i[0].lower()):
if email:
continue
print(f"- [ ] @{username}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment