Auto merge dev → main (#1226)

* add tssbot PM2 entry + extend webhook updater to handle TSSBOT

- TSSBOT/ecosystem.config.js: defines just the tssbot app for now.
  Uses system python3 (skeleton has no deps); switch to .venv/bin/python
  once TSSBOT/BOT/botscript.py and a real dependency set exist.
- TSSBOT/start_bot.py: change the stub from exit-immediately to an
  idle loop with SIGTERM/SIGINT handling so PM2 doesn't restart-loop
  the placeholder.
- SREBOT/github_webhook_updater.py: same listener handles the whole
  monorepo. Add a tssbot restart rule that triggers on TSSBOT/BOT/,
  TSSBOT root .py, TSSBOT/start_bot.py, TSSBOT/ecosystem.config.js,
  or SHARED/ changes. A push to SHARED restarts both bots; pushes
  scoped to one bot only restart that bot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* update game files and start tssbot

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
NotSoToothless
2026-05-13 23:49:54 -07:00
committed by GitHub
parent 39ef90b3fd
commit 2f6a9687b1
+19 -5
View File
@@ -82,9 +82,9 @@ def pull_and_restart(changed_files: list[str]) -> tuple[bool, str]:
# Determine which processes to restart based on changed files
processes_to_restart = []
# Bot: restart if SREBOT/BOT/, SHARED/, SREBOT/start_bot.py, ecosystem.config.js,
# or SREBOT root .py files changed
bot_changed = any(
# SREBOT bot: restart if SREBOT/BOT/, SHARED/, SREBOT/start_bot.py,
# SREBOT/ecosystem.config.js, or SREBOT root .py files changed.
srebot_changed = any(
f.startswith('SREBOT/BOT/')
or f.startswith('SHARED/')
or f == 'SREBOT/start_bot.py'
@@ -92,9 +92,23 @@ def pull_and_restart(changed_files: list[str]) -> tuple[bool, str]:
or (f.startswith('SREBOT/') and f.endswith('.py') and f.count('/') == 1 and not f.endswith('/' + WEBHOOK_FILENAME))
for f in changed_files
)
if bot_changed:
if srebot_changed:
processes_to_restart.append('srebot')
logger.info("Bot files changed, will restart srebot")
logger.info("SREBOT files changed, will restart srebot")
# TSSBOT bot: restart if TSSBOT/BOT/, TSSBOT/start_bot.py,
# TSSBOT/ecosystem.config.js, SHARED/, or TSSBOT root .py files changed.
tssbot_changed = any(
f.startswith('TSSBOT/BOT/')
or f.startswith('SHARED/')
or f == 'TSSBOT/start_bot.py'
or f == 'TSSBOT/ecosystem.config.js'
or (f.startswith('TSSBOT/') and f.endswith('.py') and f.count('/') == 1)
for f in changed_files
)
if tssbot_changed:
processes_to_restart.append('tssbot')
logger.info("TSSBOT files changed, will restart tssbot")
# API server: restart if SREBOT/server.js changed
api_changed = any(f == 'SREBOT/server.js' for f in changed_files)