From 86cddef51f49b9842c60282d70a95e97a27d2a47 Mon Sep 17 00:00:00 2001 From: Mathieu Lamiot Date: Mon, 22 Jan 2024 12:31:43 +0100 Subject: [PATCH] Fix URL formatting Fix payload action typo for block actions --- sources/handlers/GithubReleaseHandler.py | 2 +- sources/handlers/SlackBlockActionHandler.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/handlers/GithubReleaseHandler.py b/sources/handlers/GithubReleaseHandler.py index a11f4a5..a49b1e0 100644 --- a/sources/handlers/GithubReleaseHandler.py +++ b/sources/handlers/GithubReleaseHandler.py @@ -33,7 +33,7 @@ def process_release(self, app_context, release_params): # Send a message to Slack text = "The draft release note for " + repository_readable_name + " " + release_params.version - text += " is available on Notion: " + notion_url + text += " is available on <" + notion_url + "|Notion>. " blocks = self.slack_message_factory.get_release_note_review_blocks(text) diff --git a/sources/handlers/SlackBlockActionHandler.py b/sources/handlers/SlackBlockActionHandler.py index 27818f1..8c2b3ac 100644 --- a/sources/handlers/SlackBlockActionHandler.py +++ b/sources/handlers/SlackBlockActionHandler.py @@ -25,7 +25,7 @@ def process(self, payload_json): """ # Retrieve the shortcut callback - callback = payload_json['action']['action_id'] + callback = payload_json['actions']['action_id'] # Process the paylaod according to the callback if 'publish-release-note' == callback: @@ -42,4 +42,4 @@ def publish_release_note_callback(self, payload_json): """ self.slack_message_factory.post_message(current_app.app_context(), self.slack_message_factory.get_channel('releases'), - payload_json['action']['value']) + payload_json['actions']['value'])