-
-
Save sks444/ee1e6b8964f54e05b78c2514b2ac1405 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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