refactor: statusbar、companion、herdr 外掛改名加上 jsc- 前綴

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
root
2026-10-13 07:43:50 +00:00
co-authored by Claude Sonnet 5.5
parent f10b168c28
commit 58e2b2d26a
53 changed files with 28 additions and 25 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# 用法:tick.sh <owner/repo> <N> <第幾項>
# 把議題內文第 k 個核取方塊(已勾的也算在內)改成「[x]」。每次都重新讀取最新內文再改。
source "$(dirname "$0")/lib.sh"
REPO="${1:?}"; N="${2:?}"; K="${3:?用法:tick.sh <owner/repo> <N> <第幾項>}"
NEW="$(issue_json "$REPO" "$N" | python3 -c "
import sys,json,re
body=json.load(sys.stdin)['body']
k=int(sys.argv[1]); i=[0]
def rep(m):
i[0]+=1
return '[x]' if i[0]==k else m.group(0)
out=re.sub(r'\[[ xX]\]', rep, body)
if i[0]<k: sys.exit('只有 %d 個核取方塊,沒有第 %d 個' % (i[0],k))
sys.stdout.write(out)
" "$K")"
tea issues edit "$N" --repo "$REPO" --description "$NEW" >/dev/null
echo "#$N 第 $K 項已勾選,剩 $(grep -o '\[ \]' <<<"$NEW" | wc -l) 項"