feat(message): Add mrkdwn parameter for Slack formatting#1025
Closed
feat(message): Add mrkdwn parameter for Slack formatting#1025
Conversation
Add optional `mrkdwn` boolean parameter to the message step that enables Slack mrkdwn formatting when sending messages via Slack notifiers. Changes: - Add Mrkdwn field to PipelineStepMessage struct - Update MessageStepMessageCreator to conditionally use MarkdownType - Add schema attribute for message step - Add comprehensive unit tests (3 test functions, 10 sub-tests) When mrkdwn=true, the message step uses Slack's `mrkdwn` block type instead of `plain_text`, enabling formatting like *bold*, _italic_, `code`, and <url|clickable links>. Closes #1024 Co-Authored-By: Claude <noreply@anthropic.com>
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
|
This PR was closed because it has been stalled for 90 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
mrkdwnboolean parameter to the message step that enables Slack mrkdwn formatting when sending messages via Slack notifiers.Closes #1024
Problem
Currently, the message step sends plain text to Slack using
plain_textblock type, which means formatting like*bold*,_italic_, and<url|text>links don't render. Users who rely on notifiers cannot send formatted messages.Solution
Added an optional
mrkdwnparameter that switches the Slack text block type fromplain_texttomrkdwn, enabling Slack's markdown-like formatting.Changes
internal/resources/flowpipe_pipeline_step_message.gointernal/resources/flowpipe_pipeline_schema.gointernal/primitive/message.gointernal/primitive/message_test.goUsage
Block JSON Comparison
Without mrkdwn (default):
{"type": "section", "text": {"type": "plain_text", "text": "*bold*"}}With mrkdwn=true:
{"type": "section", "text": {"type": "mrkdwn", "text": "*bold*"}}Test Plan
Supported Formatting
*bold*_italic_~strike~strikethrough`code`inline code<https://url|text>Notes
mrkdwnparameter only affects Slack integrationsplain_text(bold/italic/code) but not links - usingmrkdwn=trueensures consistent cross-platform behavior🤖 Generated with Claude Code