52ff2f80ad
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
74 lines
1.8 KiB
Python
74 lines
1.8 KiB
Python
import sqlite3
|
|
from datetime import datetime
|
|
|
|
conn = sqlite3.connect("/app/tracker.db")
|
|
cursor = conn.cursor()
|
|
|
|
# 先查看当前 Phase 4 任务
|
|
cursor.execute('SELECT name, status FROM tasks WHERE phase LIKE "%Phase 4%" OR phase LIKE "%Phase%4%"')
|
|
tasks = cursor.fetchall()
|
|
print(f"当前 Phase 4 任务数: {len(tasks)}")
|
|
for name, status in tasks[:5]:
|
|
print(f" - {name}: {status}")
|
|
|
|
# Phase 4 已完成的关键任务
|
|
phase4_completed_keywords = [
|
|
"JWT",
|
|
"Password",
|
|
"Redis",
|
|
"Email",
|
|
"注册",
|
|
"登录",
|
|
"登出",
|
|
"密码重置",
|
|
"工作空间",
|
|
"邀请",
|
|
"成员",
|
|
"权限",
|
|
"订阅",
|
|
"Repository",
|
|
"API",
|
|
"Docker",
|
|
"Kubernetes",
|
|
"健康检查",
|
|
"Celery",
|
|
"GitHub",
|
|
"测试",
|
|
"文档",
|
|
"MIT",
|
|
"README",
|
|
]
|
|
|
|
# 更新所有包含关键词的 Phase 4 任务为已完成
|
|
now = datetime.now().isoformat()
|
|
updated = 0
|
|
|
|
for keyword in phase4_completed_keywords:
|
|
cursor.execute(
|
|
"""
|
|
UPDATE tasks
|
|
SET status = 'completed', updated_at = ?
|
|
WHERE (phase LIKE "%Phase 4%" OR phase LIKE "%Phase%4%")
|
|
AND (name LIKE ? OR description LIKE ?)
|
|
AND status != 'completed'
|
|
""",
|
|
(now, f"%{keyword}%", f"%{keyword}%"),
|
|
)
|
|
updated += cursor.rowcount
|
|
|
|
conn.commit()
|
|
|
|
# 统计结果
|
|
cursor.execute(
|
|
'SELECT COUNT(*) FROM tasks WHERE (phase LIKE "%Phase 4%" OR phase LIKE "%Phase%4%") AND status = "completed"'
|
|
)
|
|
completed = cursor.fetchone()[0]
|
|
cursor.execute('SELECT COUNT(*) FROM tasks WHERE phase LIKE "%Phase 4%" OR phase LIKE "%Phase%4%"')
|
|
total = cursor.fetchone()[0]
|
|
|
|
print(f"\n✅ 更新完成:")
|
|
print(f" - 本次更新: {updated} 个任务")
|
|
print(f" - Phase 4 进度: {completed}/{total} 已完成 ({completed/total*100:.1f}%)")
|
|
|
|
conn.close()
|