Merge branch 'dev' into hugo

# Conflicts:
#	.env.dev
#	.env.shared
#	backend/app/api/chat.py
This commit is contained in:
hugo committed 2026-06-08 16:11:42 +08:00
commit ee90b66ff7
63 files changed
+4786 -1422

No files matched your search

+11 -1
View File
@@ -10,7 +10,7 @@ if ! git -C "${ROOT_DIR}" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
fi
HOOKS_DIR="${ROOT_DIR}/.githooks"
REQUIRED_HOOKS=(pre-commit pre-push _common.sh)
REQUIRED_HOOKS=(pre-commit pre-push commit-msg _common.sh)
for hook_name in "${REQUIRED_HOOKS[@]}"; do
hook_path="${HOOKS_DIR}/${hook_name}"
@@ -28,8 +28,18 @@ if ! git -C "${ROOT_DIR}" config core.hooksPath .githooks; then
exit 1
fi
if [[ -f "${ROOT_DIR}/package.json" ]]; then
echo "[hook-install] Installing commitlint dependencies (npm install)..."
if ! (cd "${ROOT_DIR}" && npm install); then
echo "[hook-install] npm install failed. commit-msg hook requires root node_modules."
echo "[hook-install] please run manually: cd ${ROOT_DIR} && npm install"
exit 1
fi
fi
echo "[hook-install] Installed Git hooks successfully."
echo "[hook-install] pre-commit: models 变更需带 migration;frontend 暂存时跑 vue-tsc"
echo "[hook-install] commit-msg: 校验提交信息格式(Conventional Commits)"
echo "[hook-install] pre-push: 推送含 frontend 变更时跑 npm run build"
echo "[hook-install] core.hooksPath=$(git -C "${ROOT_DIR}" config --get core.hooksPath)"
echo "[hook-install] 跳过前端检查: SKIP_FRONTEND_HOOKS=1"