Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

feat(startup): auto-start slack-bridge when SLACK_BOT_TOKEN is configured - #96

Open
jgluck96 wants to merge 1 commit into
mainfrom
feat/startup-slack-bridge
Open

jgluck96 wants to merge 1 commit into
mainfrom
feat/startup-slack-bridge

Conversation

@jgluck96

@jgluck96 jgluck96 commented Jun 3, 2026

Copy link
Copy Markdown

Summary

  • Adds step 7.8 to startup.sh: auto-starts slack-bridge.py if ~/.claude/channels/slack/.env exists and contains SLACK_BOT_TOKEN
  • Checks slack_bolt is installed before attempting start; prints helpful install hint if not
  • Guards against double-start with pgrep -f slack-bridge check
  • Also adds from __future__ import annotations to slack-bridge.py for Python 3.9 compat

Note: The py39 annotation line overlaps with PR #56 (fix/slack-bridge-py39-annotations). If #56 merges first this branch will need a trivial rebase to drop that line.

Test plan

  • bash src/startup.sh with no ~/.claude/channels/slack/.env → "~ slack bridge (no token — optional)"
  • With env file but no slack_bolt → "~ slack bridge (needs: pip3 install slack_bolt)"
  • With env file and slack_bolt installed → "✓ slack bridge"

🤖 Generated with Claude Code

startup.sh section 7.8: start slack-bridge when
~/.claude/channels/slack/.env contains SLACK_BOT_TOKEN, matching the
discord (§7) and telegram (§6) bridge patterns. Checks for slack_bolt
before starting so the error message is actionable.

Also carries the from __future__ import annotations fix — str | None
syntax requires Python 3.10+ but macOS ships 3.9.6 (Xcode toolchain).
Deferring annotation evaluation makes the bridge importable and the
slack-bridge-allowlist test passable on 3.9+.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@bassilkhilo-ag2 bassilkhilo-ag2 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean. Mirrors the discord-bridge startup pattern correctly. Token gate is right — checking for the file + key presence before attempting to start. The slack_bolt install check prevents a silent crash. The from __future__ import annotations addition is consistent with the Python 3.9 compat requirement. One non-blocking note: grep -q "SLACK_BOT_TOKEN=" matches a key with an empty value, but the bridge handles that gracefully at runtime, so not a blocker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants