Merge branch 'main' into dependabot/pip/cryptography-41.0.4
This commit is contained in:
Коммит
0516b6086a
2
app.py
2
app.py
|
@ -70,7 +70,7 @@ def sync_team(client=None, owner=None, team_id=None, slug=None):
|
|||
try:
|
||||
directory_group = get_directory_from_slug(slug, custom_map, org)
|
||||
# If we're filtering on group prefix, skip if the group doesn't match
|
||||
if group_prefix.length() > 0 and not directory_group.startswith(
|
||||
if len(group_prefix) > 0 and not directory_group.startswith(
|
||||
tuple(group_prefix)
|
||||
):
|
||||
print(f"skipping team {team.slug} - not in group prefix")
|
||||
|
|
|
@ -107,7 +107,11 @@ class AzureAD:
|
|||
else:
|
||||
username = user_info[self.USERNAME_ATTRIBUTE]
|
||||
if self.AZURE_USER_IS_UPN:
|
||||
username = username.split("@")[0]
|
||||
if r"\\" in username:
|
||||
username = username.split(r"\\")[1]
|
||||
username = username.split("@")[0].split("#")[0].split("_")[0]
|
||||
username = username.translate(str.maketrans("._!#^~", "------"))
|
||||
username = username.lower()
|
||||
if "EMU_SHORTCODE" in os.environ:
|
||||
username = username + "_" + os.environ["EMU_SHORTCODE"]
|
||||
user = {
|
||||
|
|
|
@ -89,6 +89,11 @@ class GitHubApp(object):
|
|||
methods=["POST"],
|
||||
)
|
||||
|
||||
app.add_url_rule("/health_check", endpoint="health_check")
|
||||
@app.endpoint("health_check")
|
||||
def health_check():
|
||||
return "Web server is running.", 200
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return current_app.config["GITHUBAPP_ID"]
|
||||
|
|
Загрузка…
Ссылка в новой задаче