Skip to content

Commit

Permalink
Merge pull request #76 from wp-media/feature/GH-release-to-Notion-and…
Browse files Browse the repository at this point in the history
…-Slack

Fix URL formatting & payload field typo
  • Loading branch information
MathieuLamiot authored Jan 22, 2024
2 parents 7a08ccb + 86cddef commit 4940470
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sources/handlers/GithubReleaseHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions sources/handlers/SlackBlockActionHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'])

0 comments on commit 4940470

Please sign in to comment.