diff --git a/app.py b/app.py index dedc9fd..96df09c 100644 --- a/app.py +++ b/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") diff --git a/githubapp/core.py b/githubapp/core.py index 07fced3..2684192 100644 --- a/githubapp/core.py +++ b/githubapp/core.py @@ -89,6 +89,11 @@ def init_app(self, app): 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"]