Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankilevitch committed Nov 6, 2023
1 parent 5835af4 commit daeb3a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
Expand Down

0 comments on commit daeb3a7

Please sign in to comment.