chore: 修改readme相关调整

This commit is contained in:
chenping
2026-01-06 11:29:17 +08:00
parent f0995730af
commit 4869059e0c
5 changed files with 168 additions and 42 deletions

View File

@@ -0,0 +1,41 @@
# Gitee Go Workflow - Commitlint (简化版本)
# 如果 commitlint.yml 不兼容,可以尝试使用此版本
# 使用方法:将此文件重命名为 commitlint.yml
name: commitlint-simple
displayName: Commitlint 提交信息检查(简化版)
trigger:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
stages:
- name: lint
displayName: 提交信息检查
steps:
- name: 安装依赖并检查提交信息
type: shell
commands: |
# 检查 Node.js 是否可用
if command -v node >/dev/null 2>&1; then
echo "Node.js 已安装: $(node --version)"
else
echo "错误: 未找到 Node.js请确保 Gitee Go 环境已安装 Node.js"
exit 1
fi
# 安装 commitlint
npm install -g @commitlint/cli @commitlint/config-conventional
# 创建配置文件
echo '{"extends": ["@commitlint/config-conventional"]}' > .commitlintrc.json
# 检查提交信息(简化版:只检查最新提交)
echo "检查最新提交信息..."
npx commitlint --from HEAD~1 --to HEAD --verbose