[PR #198] refactor: merge bot/cli.ts into bot/index.ts, add serve subcommand #198

Open
opened 2026-10-27 21:10:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/198
Author: @snomiao
Created: 4/10/2026
Status: 🔄 Open

Base: main ← Head: refactor/merge-bot-cli-into-index


📝 Commits (4)

  • fd3271c refactor: merge bot/cli.ts into bot/index.ts, add serve subcommand
  • a1f7864 fix: address review comments on serve subcommand
  • a68b6ae docs: update all references from bot/cli.ts to bot/index.ts serve
  • 4714381 Merge branch 'main' into refactor/merge-bot-cli-into-index

📊 Changes

15 files changed (+1399 additions, -1386 deletions)

View changed files

📝 CLAUDE.md (+5 -5)
📝 bot-start.sh (+1 -1)
📝 bot/Dockerfile (+1 -1)
📝 bot/README.md (+11 -8)
➖ bot/cli.ts (+0 -1342)
📝 bot/index.ts (+1360 -8)
📝 bot/start-with-status.sh (+2 -2)
📝 bot/up.sh (+1 -1)
📝 docker-compose.yml (+2 -2)
📝 docs/RESTART-FLOW.md (+1 -1)
📝 docs/RESTART-QUICKREF.md (+6 -6)
📝 docs/RESTART-SUMMARY.md (+2 -2)
📝 docs/RESTART.md (+2 -2)
📝 package.json (+3 -3)
📝 run-bot.md (+2 -2)

📄 Description

Summary

Consolidates bot/cli.ts and bot/index.ts into a single bot/index.ts entry point.

Changes

  • Merged the yargs CLI (bot/cli.ts) into bot/index.ts
  • Original Slack bot startup is now the serve subcommand: prbot serve --continue
  • Updated all startup scripts (bot/up.sh, bot-start.sh, bot/start-with-status.sh)
  • Updated bot/Dockerfile, docker-compose.yml, package.json bin entries
  • Deleted bot/cli.ts

Usage

# Start Slack bot (was: bun bot/index.ts)
bun bot/index.ts serve --continue

# CLI commands unchanged
prbot slack read-thread -c C123 -t 123
prbot code pr -r Comfy-Org/ComfyUI -p 'Fix bug'
prbot --help

Motivation

Single entry point is simpler — no ambiguity between two bot files. Net +6 lines, no logic changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/198 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 4/10/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `refactor/merge-bot-cli-into-index` --- ### 📝 Commits (4) - [`fd3271c`](https://github.com/Comfy-Org/Comfy-PR/commit/fd3271ca90b3052901d4b2a94956011d6351955e) refactor: merge bot/cli.ts into bot/index.ts, add serve subcommand - [`a1f7864`](https://github.com/Comfy-Org/Comfy-PR/commit/a1f7864fbf6c8dde0bfc54a63cfe4d70a8dcf87c) fix: address review comments on serve subcommand - [`a68b6ae`](https://github.com/Comfy-Org/Comfy-PR/commit/a68b6aeda1587316a258e4bde17ffca5212f73ad) docs: update all references from bot/cli.ts to bot/index.ts serve - [`4714381`](https://github.com/Comfy-Org/Comfy-PR/commit/471438105f223471b898f4919b913b4a3b0b0d2b) Merge branch 'main' into refactor/merge-bot-cli-into-index ### 📊 Changes **15 files changed** (+1399 additions, -1386 deletions) <details> <summary>View changed files</summary> 📝 `CLAUDE.md` (+5 -5) 📝 `bot-start.sh` (+1 -1) 📝 `bot/Dockerfile` (+1 -1) 📝 `bot/README.md` (+11 -8) ➖ `bot/cli.ts` (+0 -1342) 📝 `bot/index.ts` (+1360 -8) 📝 `bot/start-with-status.sh` (+2 -2) 📝 `bot/up.sh` (+1 -1) 📝 `docker-compose.yml` (+2 -2) 📝 `docs/RESTART-FLOW.md` (+1 -1) 📝 `docs/RESTART-QUICKREF.md` (+6 -6) 📝 `docs/RESTART-SUMMARY.md` (+2 -2) 📝 `docs/RESTART.md` (+2 -2) 📝 `package.json` (+3 -3) 📝 `run-bot.md` (+2 -2) </details> ### 📄 Description ## Summary Consolidates `bot/cli.ts` and `bot/index.ts` into a single `bot/index.ts` entry point. ### Changes - Merged the yargs CLI (`bot/cli.ts`) into `bot/index.ts` - Original Slack bot startup is now the `serve` subcommand: `prbot serve --continue` - Updated all startup scripts (`bot/up.sh`, `bot-start.sh`, `bot/start-with-status.sh`) - Updated `bot/Dockerfile`, `docker-compose.yml`, `package.json` bin entries - Deleted `bot/cli.ts` ### Usage ```bash # Start Slack bot (was: bun bot/index.ts) bun bot/index.ts serve --continue # CLI commands unchanged prbot slack read-thread -c C123 -t 123 prbot code pr -r Comfy-Org/ComfyUI -p 'Fix bug' prbot --help ``` ### Motivation Single entry point is simpler — no ambiguity between two bot files. Net +6 lines, no logic changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#198
No description provided.