Skip to content

Instantly share code, notes, and snippets.

@sks444 sks444/newcomers.py Secret
Created May 23, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.