Skip to content

Instantly share code, notes, and snippets.

@sks444
Created May 23, 2018 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sks444/ee1e6b8964f54e05b78c2514b2ac1405 to your computer and use it in GitHub Desktop.
Save sks444/ee1e6b8964f54e05b78c2514b2ac1405 to your computer and use it in GitHub Desktop.
from functools import lru_cache
from github import Github
from coala_web.settings import GITHUB_API_KEY
g1 = Github(GITHUB_API_KEY)
org = g1.get_organization('coala')
@lru_cache(maxsize=32)
def get_newcomers():
teams = org.get_teams()
for team in teams:
if team.name == 'coala newcomers':
coala_newcomers = team
if team.name == 'coala maintainers':
coala_maintainers = team
if team.name == 'coala developers':
coala_developers = team
newcomers = coala_newcomers.get_members()
developers = coala_developers.get_members()
maintainers = coala_maintainers.get_members()
newcomer_list = []
for newcomer in newcomers:
newcomer_list.append(newcomer.login)
for developer in developers:
if developer.login in newcomer_list:
newcomer_list.remove(developer.login)
for maintainer in maintainers:
if maintainer.login in newcomer_list:
newcomer_list.remove(maintainer.login)
# Removing aspects developers
newcomer_list.remove('KrishMunot')
newcomer_list.remove('shrutishrm512')
# Removing OSX devs
newcomer_list.remove('swapagarwal')
newcomer_list.remove('AnonymousDeveloper4201337')
newcomer_list.remove('prakashdanish')
newcomer_list.remove('stephenbhope')
return newcomer_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment