perf(ci): P0-4 Phase 1 - PR模式下lint增量扫描,只扫改动文件 #344
Reference in New Issue
Block a user
Delete Branch "feat/ci-incremental-lint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
变更内容
P0-4 Phase 1:PR 模式下 lint 增量扫描
核心改动
新增步骤:Calculate changed Python files
git diff获取改动的 Python 文件SCAN_MODE和CHANGED_PY_FILES环境变量供后续步骤使用Run code quality checks 支持增量模式
incremental模式:black/isort/ruff/compileall 只扫改动文件skip_py模式:没有 Python 文件变更时跳过 lint 检查full模式(默认):全量扫描,跟之前行为一致scripts/目录,与全量模式规则对齐Prepare git for migration diff 兼容已有 git 仓库
.git目录是否已存在,避免重复git remote add冲突预期收益
风险控制
b8b0821ffcto3962994c43LGTM - 增量扫描设计合理,三模式 fallback 正确,migration diff 兼容性处理到位
3962994c43tofed7103eecCI全绿,自动审批通过。
fed7103eectof7ceb17efa