reformatted with Black
This commit is contained in:
Родитель
b82ce6eda9
Коммит
e38cbf9fde
4
app.py
4
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
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче