Created
July 7, 2020 06:19
-
-
Save dimastatz/9b029bf0ebb7796daa86738b3f78680e 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 github import Github, Organization, NamedUser | |
def create_github(url, token): | |
return Github(base_url="https://{}/api/v3".format(url), login_or_token=token) | |
def get_org(g: Github, org_name: str): | |
return [x for x in g.get_user().get_orgs() if x.name == org_name][0] | |
def get_members(org: Organization.Organization): | |
return [(m.name, t.name) for t in org.get_teams() for m in t.get_members()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you please share the repo link