fix(ci): 修复PR扫描的基线和头版本配置

- 将基础提交哈希从 github.event.before 更新为 github.event.pull_request.base.sha
- 将当前提交哈希从 github.sha 更新为 github.event.pull_request.head.sha
- 确保PR工作流正确比较基线和目标分支的差异
This commit is contained in:
GeWuYou 2026-04-15 13:17:08 +08:00
parent 2329cba3a6
commit a01ec8d29c

View File

@ -67,9 +67,9 @@ jobs:
# 扫描路径,. 表示扫描整个仓库
path: .
# 基础提交哈希,用于与当前提交进行比较
base: ${{ github.event.before }}
base: ${{ github.event.pull_request.base.sha }}
# 当前提交哈希,作为扫描的目标版本
head: ${{ github.sha }}
head: ${{ github.event.pull_request.head.sha }}
# 构建和测试 job并行执行
build-and-test: