From db1871d577dc3af3a66237f43797244dcf710669 Mon Sep 17 00:00:00 2001 From: Patryk Dobrowolski Date: Fri, 18 Oct 2024 14:09:31 +0200 Subject: [PATCH] test17 --- cmd/cloud-run/slack-message-sender/slack-message-sender.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/cloud-run/slack-message-sender/slack-message-sender.py b/cmd/cloud-run/slack-message-sender/slack-message-sender.py index dea64234f0e3..469205876fed 100755 --- a/cmd/cloud-run/slack-message-sender/slack-message-sender.py +++ b/cmd/cloud-run/slack-message-sender/slack-message-sender.py @@ -301,13 +301,12 @@ def get_slack_user_mapping(): return {} -# Cache the user mapping to avoid frequent API calls -slack_user_mapping = get_slack_user_mapping() - @app.route("/issue-labeled", methods=["POST"]) def issue_labeled() -> Response: '''This function sends information about labeled issues in a Slack channel''' + # Cache the user mapping to avoid frequent API calls + slack_user_mapping = get_slack_user_mapping() log_fields: Dict[str, Any] = prepare_log_fields() log_fields["labels"]["io.kyma.app"] = "issue-labeled" try: