diff --git a/app.py b/app.py index 2f5a752..2c86705 100644 --- a/app.py +++ b/app.py @@ -28,9 +28,9 @@ def sync_new_team(): """ owner = github_app.payload["organization"]["login"] team_id = github_app.payload["team"]["id"] - if os.environ['USER_DIRECTORY'].upper() == 'AAD': + if os.environ["USER_DIRECTORY"].upper() == "AAD": ## Azure APIs don't currently support case insensitive searching - slug = github_app.payload["team"]["name"].replace(' ', '-') + slug = github_app.payload["team"]["name"].replace(" ", "-") else: slug = github_app.payload["team"]["slug"] client = github_app.installation_client diff --git a/githubapp/azuread.py b/githubapp/azuread.py index ed90149..9c7fa33 100644 --- a/githubapp/azuread.py +++ b/githubapp/azuread.py @@ -77,7 +77,10 @@ class AzureAD: ).json()["value"] for member in members: user_info = self.get_user_info(token=token, user=member["id"]) - user = {"username": user_info[self.USERNAME_ATTRIBUTE], "email": user_info["mail"]} + user = { + "username": user_info[self.USERNAME_ATTRIBUTE], + "email": user_info["mail"], + } print(user) member_list.append(user) return member_list