Repository navigation
fix: handle newline for slack - #4357
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Summary by CodeRabbit
WalkthroughA new custom Handlebars helper called "newline" was registered in the Slack destination transform module. This helper allows templates to explicitly insert newline characters. No existing logic or exported entities were altered; the change solely extends template functionality. Changes
Suggestions for Improvements
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/v0/destinations/slack/transform.js (1)
22-24: Suggest adding documentation and tests for thenewlinehelper.
To ensure maintainability and clarity for template authors, consider:
- Documenting the helper usage in the Slack destination README or as an inline code comment.
- Adding a unit test that compiles a simple template (e.g.,
Hello{{newline}}World) and asserts the output contains\n.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/v0/destinations/slack/transform.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: Focus on ESLint errors (max 3) and warnings (max 5).
**/*.js: Focus on ESLint errors (max 3) and warnings (max 5).
src/v0/destinations/slack/transform.js
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
src/v0/destinations/slack/transform.js (1)
22-24: Approval: Newline helper registration is concise and appropriate.
The customnewlinehelper cleanly exposes newline insertion in templates and aligns with the PR objective.
|
Allure Test reports for this run are available at:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## hotfix/4-june-2025 #4357 +/- ##
=====================================================
Coverage ? 91.13%
=====================================================
Files ? 638
Lines ? 33451
Branches ? 7896
=====================================================
Hits ? 30485
Misses ? 2697
Partials ? 269 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Allure Test reports for this run are available at:
|
|
|
so this requires customers to update their config right? can migrating them automatically using migration script? |
Thats not needed we can ask the customer to do it themselves |
* fix: handle newline for slack * fix: update slack tests



What are the changes introduced in this PR?
This pull request introduces a new custom Handlebars helper in the Slack transformation logic to enhance template rendering.
Enhancements to Slack transformation:
src/v0/destinations/slack/transform.js: Added a custom Handlebars helper namednewlineto insert newline characters (\n) in templates. This change improves flexibility in formatting Slack messages.What is the related Linear task?
Resolves INT-3728
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.