Skip to content

fix: use real newlines in stage-reset-bot Slack thread replies#8977

Merged
jaco-brink merged 1 commit intomainfrom
jacobusbrink/nes-1540-fix-stage-reset-bot-slack-thread-replies-show-literal-n
Apr 8, 2026
Merged

fix: use real newlines in stage-reset-bot Slack thread replies#8977
jaco-brink merged 1 commit intomainfrom
jacobusbrink/nes-1540-fix-stage-reset-bot-slack-thread-replies-show-literal-n

Conversation

@jaco-brink
Copy link
Copy Markdown
Collaborator

@jaco-brink jaco-brink commented Apr 8, 2026

Summary

  • Replaces literal \n escape sequences in Slack message text with real newlines using NL=$'\n'
  • Affects all three thread reply blocks: clean merges, auto-resolved, failed/missing branches
  • Fixes NES-1540: Slack thread replies were displaying literal \n characters instead of line breaks

Before

image

After

image

Test plan

  • Run reset-stage.sh against a stage environment and verify Slack thread replies render with proper line breaks
  • Confirm clean merges, auto-resolved, and failed/missing branch sections all format correctly

🤖 Generated with Claude Code

Literal \n in double-quoted bash strings was passed through jq as
escaped backslash-n, causing Slack to render \n text instead of
line breaks in threaded PR lists.

NES-1540

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 8, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Walkthrough

The reset-stage.sh script's Slack message construction was refactored to use a newline variable instead of hardcoded escape sequences, improving consistency and readability in message formatting across multiple sections.

Changes

Cohort / File(s) Summary
Slack Message Formatting
tools/scripts/reset-stage.sh
Replaced hardcoded \n sequences with NL=$'\n' variable in message construction for "Clean merges", "Auto-resolved", "Failed", and "Missing branches" sections to standardize line break handling in Slack thread payloads.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: replacing literal \n escape sequences with real newlines in Slack thread replies for the stage-reset-bot.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jacobusbrink/nes-1540-fix-stage-reset-bot-slack-thread-replies-show-literal-n

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 8, 2026

View your CI Pipeline Execution ↗ for commit 5f5862b

Command Status Duration Result
nx affected --target=subgraph-check --base=9f0f... ✅ Succeeded <1s View ↗
nx affected --target=extract-translations --bas... ✅ Succeeded <1s View ↗
nx affected --target=lint --base=9f0f429c588b93... ✅ Succeeded <1s View ↗
nx affected --target=type-check --base=9f0f429c... ✅ Succeeded <1s View ↗
nx run-many --target=codegen --all --parallel=3 ✅ Succeeded 2s View ↗
nx run-many --target=prisma-generate --all --pa... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-08 03:51:11 UTC

@jaco-brink jaco-brink self-assigned this Apr 8, 2026
@jaco-brink jaco-brink requested a review from jianwei1 April 8, 2026 03:52
@jaco-brink jaco-brink added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 2a160a6 Apr 8, 2026
22 of 24 checks passed
@jaco-brink jaco-brink deleted the jacobusbrink/nes-1540-fix-stage-reset-bot-slack-thread-replies-show-literal-n branch April 8, 2026 04:04
tanflem pushed a commit that referenced this pull request Apr 13, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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