Skip to content

refactor: extract Slack messaging into dedicated package#87

Open
douglance wants to merge 5 commits intomainfrom
dl/slack-package
Open

refactor: extract Slack messaging into dedicated package#87
douglance wants to merge 5 commits intomainfrom
dl/slack-package

Conversation

@douglance
Copy link
Contributor

@douglance douglance commented Jan 15, 2026

Summary

  • Created new @arbitrum-monitoring/slack package with all Slack-related code
  • Moved from utils:
    • createSlackPoster - factory for creating monitor-specific Slack posters
    • postSlackMessage - core posting logic with CI info appending
    • sanitizeSlackMessage - redacts sensitive env vars from messages
    • githubCIUtils - formats GitHub Actions run links
  • Updated monitors to import from @arbitrum-monitoring/slack:
    • assertion-monitor
    • batch-poster-monitor
    • retryable-monitor
  • Slack package is now fully self-contained with no dependency on utils

Test plan

  • npm run test in slack package passes (6 tests)
  • TypeScript compiles for slack and utils packages
  • All monitor imports updated

- Create new `packages/slack` package with all Slack-related code
- Move createSlackPoster, postSlackMessage, sanitizeSlackMessage from utils
- Update monitors to import from 'slack' instead of 'utils'
- Export formatGitHubCIInfo from utils (used by slack package)
- Remove @slack/web-api dependency from utils
- Add build:deps script to root for building utils and slack packages
- Update monitor build scripts to use yarn --cwd ../.. build:deps
- Add build script and dist output paths to slack package
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.

1 participant