Merge pull request '修改初始配置文件 适配gitea[AC-INIT]' (#11) from setup-gate into main

Reviewed-on: MerCry/ai-robot#11
This commit is contained in:
MerCry 2026-02-24 03:10:33 +00:00
commit 667a362596
1 changed files with 18 additions and 4 deletions

View File

@ -42,7 +42,21 @@ jobs:
git fetch --depth=1 origin "$COMMIT_SHA"
git checkout -f "$COMMIT_SHA"
- name: 1. OpenAPI Contract Level Check
- name: 1. Commit Message Check
shell: sh
run: |
echo "Checking commit messages for [AC-...] or [TASK-...] (range: refs/remotes/origin/main..HEAD)"
# refs/remotes/origin/main is fetched in the checkout step
git log --no-merges --format=%B refs/remotes/origin/main..HEAD | cat
if git log --no-merges --format=%B refs/remotes/origin/main..HEAD | grep -Eq '\[(AC|TASK)-'; then
echo "OK: Found [AC-...] or [TASK-...] in PR commits"
else
echo "ERROR: At least one commit message in the PR must contain [AC-...] or [TASK-...]"
exit 1
fi
- name: 2. OpenAPI Contract Level Check
env:
REQUIRE_PROVIDER_L2: "1"
shell: sh
@ -50,15 +64,15 @@ jobs:
chmod +x scripts/*.sh
./scripts/check-openapi-level.sh
- name: 2. AC Traceability Check
- name: 3. AC Traceability Check
shell: sh
run: ./scripts/check-traceability.sh
- name: 3. OpenAPI Breaking Change Check
- name: 4. OpenAPI Breaking Change Check
shell: sh
run: ./scripts/check-openapi-diff.sh
- name: 4. Minimum Self-Test (mvn test)
- name: 5. Minimum Self-Test (mvn test)
shell: sh
run: |
# 针对 Java Spring 项目运行最小单测 (方案 B: 不存在则提示跳过)