From 2f6a9687b118c35320f393b3303a4e379f822533 Mon Sep 17 00:00:00 2001 From: NotSoToothless <67082114+FURRO404@users.noreply.github.com> Date: Wed, 13 May 2026 23:49:54 -0700 Subject: [PATCH] =?UTF-8?q?Auto=20merge=20dev=20=E2=86=92=20main=20(#1226)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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) * update game files and start tssbot --------- Co-authored-by: Claude Opus 4.7 (1M context) --- github_webhook_updater.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/github_webhook_updater.py b/github_webhook_updater.py index f12548f..a5fa768 100644 --- a/github_webhook_updater.py +++ b/github_webhook_updater.py @@ -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)