---
title: "用 Comma 處理 GitHub 與 CI Loop · Comma 部落格"
description: "在聊天中請 Comma 寫一個 Loop，監看程式庫中的帳務變更、失敗的檢查或發布回歸，只在你的條件觸發時才喚醒 Worker。"
url: https://comma.surf/zh-tw/blog/comma-for-github-loops
language: zh-TW
---

[返回部落格](https://comma.surf/zh-tw/blog)

Comma Team · 2026 年 11 月 23 日 · 閱讀約 1 分鐘

# 用 Comma 處理 GitHub 與 CI Loop

在聊天中請 Comma 寫一個 Loop，監看程式庫中的帳務變更、失敗的檢查或發布回歸，只在你的條件觸發時才喚醒 Worker。

[開始使用](https://app.comma.surf/) [閱讀文件](https://comma.surf/zh-tw/docs/salix/loops)

大多數工程團隊的警示疲勞來自粗糙的工具：GitHub 每則留言都寄信給你、Slack bot 每次綠燈建置都發通知，而以 cron 為基礎的 AI 腳本每十分鐘就燒一次 token，只為了得出「什麼事都沒發生」的結論。

有了 **Salix Loops**，你用白話描述你在意的確切程式庫條件。Comma 會編譯出一個輕量的 Loop，在 Salix 上持續執行，並且**只在你的規則真正觸發時才喚醒 Worker**。

## GitHub Loop 如何運作

1. 在 `Plugins` 中連接 **GitHub**（如果要把警示送到頻道或 issue，也連接 **Slack** 或 **Linear**）。
2. 在 Router 聊天中說明監看條件和要採取的動作。
3. Comma 寫好 Loop、顯示確切的邏輯，並在 Tasks 側欄中建立一個 **On updates** Task。
4. 在條件觸發之前，不會呼叫任何大型模型。觸發時，Worker 會執行你的調查並回報。

## 四個高訊號的 GitHub Loop

### 1. 高風險路徑監看（帳務、驗證、遷移）

text

```
Watch acme/api on GitHub. Wake me only when a pull request modifies
files under billing/, auth/, or priv/repo/migrations/. Summarize what
changed, check whether a migration manifest or test was included, and
ping me in chat.
```

你能立刻審查關鍵部分，而不必讀遍程式庫裡的每一個 UI 微調。

Loop 平時保持安靜，直到某個 pull request 動到高風險路徑，才出聲說明風險。

### 2. 主線 CI 失敗調查員

text

```
Watch the main branch workflows on acme/api. Ignore canceled runs.
If a required job fails on main, pull the failing step log, identify
the likely breaking commit from the last 5 merges, and open a thread
in #eng-ci with the exact error and suspected PR.
```

團隊收到的不再是一則逼人點開 4,000 行日誌的紅色 Slack 原始警示，而是 60 秒內送到的失敗斷言和提交 diff。

### 3. 相依套件與安全公告監看

text

```
Every weekday morning, check Dependabot and security PRs across
acme/api and acme/web. Group safe patch bumps separately from major
upgrades, check if CI passed on each, and line up a single review list
in my morning Routine.
```

### 4. 合併後的發布追蹤

text

```
Watch our release workflow after a PR with label "customer-facing"
merges to main. Wait until the production deployment check turns
green, then draft a short release note with the PR link and put it
in Needs Review before posting to #changelog.
```

## 編輯、暫停或停用 Loop

每個 Loop 都以一個看得見的 **On updates** Task 存在：

- 打開 Task 檢查它的觸發歷史和確切的程式碼。
- 告訴 Comma「把帳務 Loop 收緊，忽略測試 fixture 裡的變更」，就能就地更新過濾條件。
- 告訴 Comma「把發布 Loop 暫停到週一」，或在遷移或發布結束時取消這個 Task。

## 打造乾淨 Loop 的最佳做法

- **先窄範圍過濾**：在喚醒 LLM 之前，先依程式庫、路徑前綴、標籤或失敗狀態比對。
- **把觀察和行動分開**：讓 Loop 去調查、摘要，並開**草稿** PR 或 issue；合併、回滾和對外公告留在 **Needs Review**。
- **搭配早晨 Routine**：緊急的失敗（`main` 變紅、帳務 diff）立即通知；不緊急的程式庫摘要則併入你早上 8:30 的 Routine。

**下一步：**[用 Comma 處理值班與 Bug 分流](https://comma.surf/zh-tw/blog/comma-for-on-call) · [自行託管 Comma 與 BYOK](https://comma.surf/zh-tw/blog/self-hosting-comma)

指南

[返回部落格](https://comma.surf/zh-tw/blog)

分享

## 相關文章

2026 年 12 月 3 日

### [Comma 入門](https://comma.surf/zh-tw/blog/comma-101)

2026 年 12 月 2 日

### [給管理員的 Comma](https://comma.surf/zh-tw/blog/comma-for-admins)

2026 年 12 月 1 日

### [聊天 App 裡的 Comma](https://comma.surf/zh-tw/blog/comma-in-your-chat-apps)

## Try Comma, Now.

[開始使用](https://app.comma.surf/)
