From daeb3a711a7fcb939cdad12430b9a1f641d202f8 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Mon, 6 Nov 2023 20:42:44 +0200 Subject: [PATCH] update --- core/handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/handler.py b/core/handler.py index 95b3b00..616af42 100644 --- a/core/handler.py +++ b/core/handler.py @@ -15,7 +15,7 @@ class Handler: def generate_scorecards_reminders(cls): logger.info("Initializing Port client") port_client = PortClient(settings.port_api_url, settings.port_client_id, settings.port_client_secret) - logger.info("Fetching entities") + logger.info(f"Fetching entities for team {settings.team}, blueprint {settings.blueprint}, scorecard {settings.scorecard}") entities = port_client.search_entities( { "combinator": "and", @@ -33,6 +33,9 @@ def generate_scorecards_reminders(cls): ] } ) + if not entities: + logger.info("No entities found") + return if settings.target_kind == "slack": logger.info(f"Generating scorecards reminders for {len(entities)} entities") blocks = SlackMessageGenerator().generate_scorecards_reminders(settings.blueprint,