Changelog Notify Plugin
Relevant source files
The following files were used as context for generating this wiki page:
The @nx-extend/changelog-notify plugin automates the delivery of release information to communication platforms. It captures version tags and release notes generated during the development lifecycle and broadcasts them to services like Slack and Google Chat.
Sources: packages/changelog-notify/package.json:1-8, packages/changelog-notify/README.md:1-10
Core Functionality
This plugin integrates with @jscutlery/semver to process changelog data. You typically configure the notification executors as postTargets within your versioning workflow. When a version bump occurs, the plugin extracts the relevant changelog sections and transmits them to a configured webhook.
Sources: packages/changelog-notify/README.md:16-39, packages/changelog-notify/src/executors/slack/notify-slack.impl.ts:51-55
Notification Workflow
The following diagram illustrates the sequence from a version bump to the final notification.
The workflow ensures that notifications only trigger after a successful version update.
Sources: packages/changelog-notify/README.md:52-57
Platform Integrations
The plugin provides specific executors for different messaging platforms. Each executor handles platform-specific formatting requirements for headers, markdown, and interactive elements like buttons.
Sources: packages/changelog-notify/src/executors/slack/notify-slack.impl.ts:1-16, packages/changelog-notify/src/executors/google-chat/notify-google-chat.impl.ts:1-7
Google Chat Executor
The Google Chat executor utilizes cards to display structured release information. It maps changelog lines to keyValue widgets and supports multiline content.
- Webhook Variable:
GOOGLE_CHAT_CHANGELOG_WEBHOOK - Formatting: Converts standard markdown symbols to HTML tags like
<b>for bold text. - Interactivity: If a ticket number is identified, it attaches an
onClickaction to open the issue URL.
Sources: packages/changelog-notify/src/executors/google-chat/notify-google-chat.impl.ts:9-45
Slack Executor
The Slack executor uses the Block Kit API to build rich messages. It supports custom branding through icons and usernames.
- Webhook Variable:
SLACK_CHANGELOG_WEBHOOK - Formatting: Uses
mrkdwnblocks for the main body andheaderblocks for section titles. - Interactivity: Appends an accessory button to sections if a ticket is linked.
Sources: packages/changelog-notify/src/executors/slack/notify-slack.impl.ts:18-72
Configuration Options
You define the behavior of the notification targets in the project's project.json file.
| Option | Type | Description |
|---|---|---|
tag | string | The version tag provided by semver (uses ${tag}). |
notes | string | The release notes provided by semver (uses ${notes}). |
username | string | (Slack only) The display name for the bot. Defaults to "Release BOT". |
iconEmoji | string | (Slack only) Emoji to use as the bot icon. |
iconUrl | string | (Slack only) URL of an image to use as the bot icon. |
Sources: packages/changelog-notify/README.md:41-48, packages/changelog-notify/src/executors/slack/notify-slack.impl.ts:9-13
Execution Data Flow
The following sequence diagram shows the interaction between the Nx environment, the plugin executors, and the external messaging APIs.
The executor acts as a transformer that prepares raw changelog strings for specific API payloads.
Sources: packages/changelog-notify/src/executors/slack/notify-slack.impl.ts:51-74, packages/changelog-notify/README.md:33-39
Implementation Details
The plugin relies on shared utilities to maintain consistency across platforms. The getSections utility parses the raw notes into structured Section objects containing lines and ticket metadata.
Sources: packages/changelog-notify/src/executors/slack/notify-slack.impl.ts:5-8, packages/changelog-notify/src/executors/google-chat/notify-google-chat.impl.ts:5-6
Project Structure
The plugin is organized as an Nx library with defined targets for building, testing, and linting.
- Source Root:
packages/changelog-notify/src - Build Output:
dist/packages/changelog-notify - Executor Config:
executors.json
Sources: packages/changelog-notify/project.json:4-46
The Changelog Notify plugin ensures that development teams stay informed of changes by pushing automated, formatted updates directly to internal communication channels upon every release.