Skip to content
/ slack Public

Golang application to send Slack messages

License

Notifications You must be signed in to change notification settings

nszilard/slack

Repository files navigation

Slack

CI Go Report Card GoDoc


About

slack is a simple CLI utility to send Slack messages based on a pre-defined templates, but it can also be used as a library.
Inspired by the slack-go/slack project, but wanted something simpler for personal use.

Installation

go get -u github.com/nszilard/slack

Usage

It supports both environment variables as well as flags to set values, where the latter one takes priority if the values differ.

Main command

Environment variable Flag Description
SLACK_ORG_ID slack-org-id Slack Organization ID. From the webhhok token Txxxxxx/Bxxxxxx/xxxxxxx the first group
SLACK_WEBHOOK_ID slack-webhook-id Slack Webhhok ID. From the webhhok token Txxxxxx/Bxxxxxx/xxxxxxx the second group
SLACK_WEBHOOK_TOKEN slack-webhook-token Slack Webhhok token. From the webhhok token Txxxxxx/Bxxxxxx/xxxxxxx the third group
SLACK_CHANNEL slack-channel Slack channel name (or personal ID) to send the message to
SLACK_USER slack-user To specify the username for the published message.
SLACK_USER_IMAGE slack-user-image To specify a URL to an image to use as the profile photo alongside the message

Changelog command

Environment variable Flag Description
CHANGELOG_SERVICE changelog-service Name of the Git repositry or preferred service name
CHANGELOG_VERSION changelog-version The new version
CHANGELOG_COMMITS Commits which have been released with the given version

See generated docs

  • slack - CLI to send Slack messages programmatically.