slack

package
v0.85.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package slack provides reference hook implementations that post notifications to Slack via the Slack Bot API using Block Kit formatting inside colored attachments.

All hooks use changeset.Warn failure policy so Slack errors never block the changeset pipeline. When the token is empty the hooks silently no-op, making them safe to register unconditionally.

Usage:

Configure(myCS).With(cfg).
    WithPreHooks(slack.Notify(token, channel, "deploying tokens")).
    WithPostHooks(slack.Result(token, channel))

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Notify

func Notify(token, channel, message string) changeset.PreHook

Notify returns a PreHook that posts a Block Kit message to channel using the Slack chat.postMessage API with a bot token. Messages render with a blue color bar and structured fields. Uses Warn policy with a 10s timeout. No-ops when token is empty.

func Result

func Result(token, channel string) changeset.PostHook

Result returns a PostHook that posts changeset success/failure status to channel using the Slack chat.postMessage API with Block Kit formatting. Success renders with a green color bar, failure with red. Uses Warn policy with a 10s timeout. No-ops when token is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL