Add SlackPlugin for Slack Web API notifications (issue #89, Phase 5)#99
Open
stalep wants to merge 1 commit into
Open
Add SlackPlugin for Slack Web API notifications (issue #89, Phase 5)#99stalep wants to merge 1 commit into
stalep wants to merge 1 commit into
Conversation
…Phase 5)
Posts change notifications to Slack channels using the Slack Web API
(chat.postMessage) with Block Kit formatting, following the same
patterns as Horreum's SlackChannelMessageAction.
Features:
- Posts via Slack Web API (chat.postMessage) with Bearer token auth
- Block Kit message with header, mrkdwn section, per-change details,
divider, and context block with metadata
- Fallback plain text for notification previews
- Config: {"channel": "#perf-alerts"}
- Secrets: {"token": "xoxb-..."}
- Custom message template with {folderName}, {nodeName}, {nodeType},
{changeCount} placeholders — replaces the mrkdwn section body
- Format-aware change details: ft shows value/bound/direction,
rd shows ratio/value/previous
- Checks Slack API "ok" response field (Slack returns 200 even on errors)
- Configurable API URL via h5m.slack.api.url for testing
Tests (10):
- Validation: valid config, null, empty, missing channel
- Token: missing secrets, empty secrets
- Send: Block Kit structure verification, auth header, custom template,
Slack API error handling (channel_not_found)
- Method identity check
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.
Posts change notifications to Slack channels using the Slack Web API (chat.postMessage) with Block Kit formatting, following the same patterns as Horreum's SlackChannelMessageAction.
Features:
Tests (10):