Skip to main content

Mattermost

Send release notifications to Mattermost

Config

announce:
  mattermost:
    enabled: true
    webhook_url: "{{ Env.MATTERMOST_WEBHOOK }}"
    channel: "releases"
    username: "release-bot"
    icon_url: "https://example.com/icon.png"
    message_template: "{{ ProjectName }} {{ Tag }} has been released! {{ ReleaseURL }}"

Create an incoming webhook in Main Menu > Integrations > Incoming Webhooks. The webhook payload format is the same as Slack's, so the setup should feel familiar if you have used the Slack provider.

Optional overrides

The channel, username, and icon_url fields are all optional. An omitted username posts as anodizer; an omitted channel or icon_url leaves the default configured on the webhook itself.

  • channel -- Override the default channel (e.g. town-square or releases).
  • username -- Display name of the bot post. Default: anodizer.
  • icon_url -- Override the bot's avatar with a custom image URL.

Environment variables

Store the webhook URL in an environment variable so it stays out of your committed config file. When webhook_url is unset, anodizer falls back to the MATTERMOST_WEBHOOK env var:

announce:
  mattermost:
    webhook_url: "{{ Env.MATTERMOST_WEBHOOK }}"
FieldTypeDescription
enabledbool or templateEnable Mattermost notifications
webhook_urlstringMattermost incoming webhook URL (falls back to MATTERMOST_WEBHOOK)
channelstringOptional channel override
usernamestringDisplay name of the bot post. Default: anodizer
icon_urlstringOptional bot avatar URL (templates supported)
icon_emojistringEmoji used as the bot avatar, overriding icon_url (e.g. :rocket:; templates supported)
colorstringAttachment color as a hex string. Default: #2D313E
title_templatestringAttachment title (templates supported). Default: {{ ProjectName }} {{ Tag }} is out!
message_templatestringMessage body (templates supported). Default: {{ ProjectName }} {{ Tag }} is out! Check it out at {{ ReleaseURL }}