Skip to content

Conversation

@thindie
Copy link

@thindie thindie commented Oct 13, 2025

🚀 Description

Refactor Slack integration to support rich text changelog messages with file uploads. This change removes the deprecated changelog-only functionality and introduces a new unified approach that combines file distribution with rich text changelog display using Slack Block Kit.

📄 Motivation and Context

AT-278 - Slack Build Summary Message
The previous Slack integration had separate functionality for changelog-only messages and file uploads, which created complexity and didn't provide a unified user experience. This change consolidates the functionality to provide rich text messages with file uploads, including user mentions and version information, all in a single Slack message.

🧪 How Has This Been Tested?

  • Verified Slack Block Kit JSON generation matches official Slack documentation
  • Tested file upload with rich text messages in development environment and real slack channels

📦 Types of changes

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

🔧 Technical Changes

Added

  • SlackBlocks.kt - New API for Slack Block Kit rich text formatting
  • Support for user mentions in distribution messages
  • Version/description display in Slack messages
  • Rich text formatting with bold headers and bulleted changelog lists

Removed

  • SlackChangelogConfig.kt - Deprecated changelog-only configuration
  • SendSlackChangelogTask.kt - Separate changelog task
  • SlackWebhookService.kt - Webhook-based changelog sending
  • Bot configuration block from BuildPublishSlackExtension

Modified

  • SlackUploadService.kt - Enhanced to support rich text blocks
  • SlackDistributionConfig.kt - Added user mentions and description fields
  • SlackTasksRegistrar.kt - Updated to use distribution-based service lookup
  • BuildPublishSlackExtension.kt - Simplified configuration structure

📋 Migration Guide

Before (Deprecated)

buildPublishSlack {
    bot {
        common {
            webhookUrl.set("https://hooks.slack.com/...")
            iconUrl.set("https://i.imgur.com/...")
        }
    }
    changelog {
        // changelog configuration
    }
}

After (New)

buildPublishSlack {
    distributionCommon {
        uploadApiTokenFile.set(File("path/to/slack-token.txt"))
        destinationChannel("builds")
        userMentions("@here", "@channel")
        // distributionDescription("RC v1.3.1990") // Optional: defaults to GitLab tag name
    }
}

🎯 Benefits

  • Unified file upload and changelog display in single Slack message
  • Rich text formatting with proper Slack Block Kit support
  • Simplified configuration structure
  • Better user experience with mentions and version information
  • Reduced code complexity and maintenance overhead

rinekri and others added 25 commits August 6, 2025 13:03
…cture implementation.

Clean up BuildPublishSlackExtension, SlackServiceExtension, SlackTasksRegistrar, BuildPublishSlackPlugin
…Build

Add SlackBlocks API for rich text formatting
Update SlackUploadService to support changelog with user mentions and version
Add support for Slack Block Kit rich text blocks in file uploads
Integrate changelog display in Slack distribution messages
Remove bot block, integrate settings into distributionCommon
Add userMentions and distributionDescription support
TODO - Remove current README slack config readme section
DO NOT PUBLISH before complete make-it-multimodular b
@thindie
Copy link
Author

thindie commented Oct 13, 2025

image

@rinekri rinekri force-pushed the make-it-multimodular branch 4 times, most recently from 7b9c130 to 8667f11 Compare October 26, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants