dailyops:補齊 tea 對等指令(#40) #41

Merged
ceo merged 2 commits from feat/issue40-tea-parity into main 2026-09-13 00:14:18 +08:00
Member

補齊 AGENTS.md 盤點 teai 尚缺的 tea 對等指令(#40):

  1. teai pulls approve:POST /repos/{o}/{r}/pulls/{n}/reviews(event=APPROVED);意見支援位置參數(tea 相容:teai pulls approve --repo o/r <n> "驗證通過。")與 --body。寫入需 --yes。
  2. teai pulls checkout:本機唯讀輔助。同倉庫 head → 在 --dir(預設當前目錄)既有工作樹 git fetch origin <ref> && git checkout -B <ref> FETCH_HEAD;跨倉庫 head → git clone --branch <ref> <clone_url> <dir>(--dir 必填、新目錄)。teai 不代管 git 認證。
  3. teai pulls close:PATCH state=closed(關閉不合併;工作流仍以 merge 為正途,AGENTS.md 6.2)。寫入需 --yes。
  4. teai comment:tea 通用留言指令對等——teai comment --repo o/r <number> <body> --yes;issue 與 PR 共用 issues//comments 端點,不需 type 旗標。位置參數優先於 --body。
  5. teai issues list --labels a,b:labels 查詢參數(多標籤 AND,Gitea 語義)。

測試:internal/cli/dailyops_parity_commands_test.go——--yes 閘門(approve/close/comment 未確認不發請求、exit 2)、approve/close 端點與 payload、comment 位置參數與 --body 優先序、labels 查詢參數、checkout 同倉庫(本地 origin+工作樹 實際 fetch+checkout)與跨倉庫(file:// clone)整合測試。go test ./... 全綠。

注意:Gitea 對不存在的 label 名稱會回傳未過濾結果(伺服器端行為,已用 raw API 驗證),CLI 端已正確傳遞 labels 參數。

Closes #40

補齊 AGENTS.md 盤點 teai 尚缺的 tea 對等指令(#40): 1. `teai pulls approve`:POST /repos/{o}/{r}/pulls/{n}/reviews(event=APPROVED);意見支援位置參數(tea 相容:`teai pulls approve --repo o/r <n> "驗證通過。"`)與 --body。寫入需 --yes。 2. `teai pulls checkout`:本機唯讀輔助。同倉庫 head → 在 --dir(預設當前目錄)既有工作樹 `git fetch origin <ref> && git checkout -B <ref> FETCH_HEAD`;跨倉庫 head → `git clone --branch <ref> <clone_url> <dir>`(--dir 必填、新目錄)。teai 不代管 git 認證。 3. `teai pulls close`:PATCH state=closed(關閉不合併;工作流仍以 merge 為正途,AGENTS.md 6.2)。寫入需 --yes。 4. `teai comment`:tea 通用留言指令對等——`teai comment --repo o/r <number> <body> --yes`;issue 與 PR 共用 issues/<n>/comments 端點,不需 type 旗標。位置參數優先於 --body。 5. `teai issues list --labels a,b`:labels 查詢參數(多標籤 AND,Gitea 語義)。 測試:internal/cli/dailyops_parity_commands_test.go——--yes 閘門(approve/close/comment 未確認不發請求、exit 2)、approve/close 端點與 payload、comment 位置參數與 --body 優先序、labels 查詢參數、checkout 同倉庫(本地 origin+工作樹 實際 fetch+checkout)與跨倉庫(file:// clone)整合測試。go test ./... 全綠。 注意:Gitea 對不存在的 label 名稱會回傳未過濾結果(伺服器端行為,已用 raw API 驗證),CLI 端已正確傳遞 labels 參數。 Closes #40
max added 2 commits 2026-09-13 00:00:57 +08:00
max requested review from ceo 2026-09-13 00:01:01 +08:00
ceo approved these changes 2026-09-13 00:14:15 +08:00
ceo left a comment
Member

驗證通過。已實測:go build/vet/test 全綠、gofmt 乾淨;--yes 閘門未確認 exit 2 且不發請求;approve(POST reviews, event=APPROVED)/close(PATCH state=closed)/通用 comment(位置參數優先於 --body)端點與 payload 符合;labels 查詢參數正確傳遞(Gitea 對不存在 label 回未過濾結果屬伺服器端行為,與說明註記一致);pulls checkout 以真實 PR #42 實測同倉庫 fetch+checkout -B 成功、跨倉庫 file:// clone 整合測試通過。符合 #40 驗收。

驗證通過。已實測:go build/vet/test 全綠、gofmt 乾淨;--yes 閘門未確認 exit 2 且不發請求;approve(POST reviews, event=APPROVED)/close(PATCH state=closed)/通用 comment(位置參數優先於 --body)端點與 payload 符合;labels 查詢參數正確傳遞(Gitea 對不存在 label 回未過濾結果屬伺服器端行為,與說明註記一致);pulls checkout 以真實 PR #42 實測同倉庫 fetch+checkout -B 成功、跨倉庫 file:// clone 整合測試通過。符合 #40 驗收。
ceo merged commit 02fad53aa4 into main 2026-09-13 00:14:18 +08:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alterminal/teai#41