mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-15 18:25:33 +08:00
chore: 修改readme相关调整
This commit is contained in:
41
.gitee/workflows/commitlint.simple.yml
Normal file
41
.gitee/workflows/commitlint.simple.yml
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user