從拉取 Issue 到合併部署的端到端自動化工作流。
gh auth status 正常)7w4.net有更好的技能外掛。
cd <repo-path>
gh issue list --state open
批次獲取所有需要處理的 Issue 詳情:
# 獲取所有 open issue 的編號和標題
gh issue list --state open --json number,title,body
一次性獲取所有 open issue,整體評估:
gh issue list --state open --json number,title,body,labels
分析要點:
輸出一份修復計劃: 分組 → 確定分支策略 → 明確每個 Issue 對應的改動
基於分析結果,建立分支並一次性實現所有修復:
git checkout master && git pull origin master
git checkout -b fix/batch-<date>-<總體描述>
修復策略:
每個 Issue 單獨一個 commit,便於追蹤:
# 按 Issue 逐個提交
git add <files-for-issue-A>
git commit -m "fix: <issue-A描述> (#<A>)"
git add <files-for-issue-B>
git commit -m "fix: <issue-B描述> (#<B>)"
推送統一分支:
git push -u origin fix/batch-<date>-<總體描述>
gh pr create \
--title "Batch fix: <總體描述>" \
--body "## 關聯 Issues
Closes #<A>, Closes #<B>, Closes #<C>
### Issue #<A>: <標題>
<修復說明>
### Issue #<B>: <標題>
<修復說明>
### Issue #<C>: <標題>
<修復說明>" \
--base master
gh pr checks <PR-number>
檢查項: Code Quality / Security Scan / Unit Tests / E2E Tests / Deploy Preview
CI 失敗自動修復:
gh run view <run-id> --log-failedgit commit -am "fix: CI ..." && git pushCI 通過後合併:
gh pr merge <PR-number> --merge
# 分支保護時用 --admin
gh api repos/<owner>/<repo>/deployments --jq '.[0:3] | .[] | "\(.environment) - \(.sha[0:7]) - \(.created_at)"'
報告內容:
fix: 修復問題feat: 新功能refactor: 重構docs: 文件更新style: 程式碼格式test: 測試相關fix/issue-<n>-<desc> — 修復feat/issue-<n>-<desc> — 新功能refactor/issue-<n>-<desc> — 重構這個 Skill 提供了完整的 GitHub Issue 處理流程,質量中等偏上。優點是步驟清晰、覆蓋全面,包含自動化指令碼示例;不足是內容偏模板化,缺少常見問題的解決方案,實際使用時可能需要較多的手動判斷和調整。對於需要處理 GitHub 協作流程的使用者有一定幫助,但建議配合具體文件使用。